Skip to content

Commit e531806

Browse files
committed
format_expr can now print range-typed constants
Range typed constants are subranges of integers, and the same representation applies.
1 parent e8ebba3 commit e531806

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/format_expr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static std::ostream &format_rec(std::ostream &os, const constant_exprt &src)
186186
type == ID_unsignedbv || type == ID_signedbv || type == ID_c_bool ||
187187
type == ID_c_bit_field)
188188
return os << *numeric_cast<mp_integer>(src);
189-
else if(type == ID_integer || type == ID_natural)
189+
else if(type == ID_integer || type == ID_natural || type == ID_range)
190190
return os << src.get_value();
191191
else if(type == ID_string)
192192
return os << '"' << escape(id2string(src.get_value())) << '"';

0 commit comments

Comments
 (0)