Skip to content

Commit 150cf46

Browse files
Petr BauchPetr Bauch
authored andcommitted
Better error message
Now reports the id of violating function and the two inconsistent types.
1 parent 8558e89 commit 150cf46

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/goto-programs/goto_model.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,13 @@ class goto_modelt : public abstract_goto_modelt
111111
if(!base_type_eq(
112112
it->second.type, symbol_table.lookup_ref(it->first).type, ns))
113113
{
114-
msg.error() << "error" << messaget::eom;
114+
msg.error() << id2string(it->first) << " type inconsistency\n"
115+
<< "goto program type: " << it->second.type.id_string()
116+
<< "\nsymbol table type: "
117+
<< symbol_table.lookup_ref(it->first).type.id_string()
118+
<< messaget::eom;
119+
120+
msg.error() << "" << messaget::eom;
115121
found_violation = true;
116122
}
117123
}

0 commit comments

Comments
 (0)