Skip to content

Commit fd80fe6

Browse files
Adding assertion to make sure "type" field is always set
1 parent 62d355c commit fd80fe6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/json_expr.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ json_objectt json(
287287
std::string type_string;
288288
if(!lang->from_type(underlying_type, type_string, ns))
289289
result["type"]=json_stringt(type_string);
290+
else
291+
assert(false && "unknown type");
290292

291293
mp_integer i;
292294
if(!to_integer(expr, i))

0 commit comments

Comments
 (0)