Skip to content

Commit

Permalink
Better error description (related to bug 605).
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeters committed Dec 9, 2014
1 parent 5361724 commit 7032ab2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/theory/datatypes/theory_datatypes_type_rules.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,9 @@ struct RecordTypeRule {
throw TypeCheckingExceptionPrivate(n, "record description has different length than record literal");
}
if(!(*child_it).getType(check).isComparableTo(TypeNode::fromType((*i).second))) {
throw TypeCheckingExceptionPrivate(n, "record description types differ from record literal types");
std::stringstream ss;
ss << "record description types differ from record literal types\nDescription type: " << (*child_it).getType() << "\nLiteral type: " << (*i).second;
throw TypeCheckingExceptionPrivate(n, ss.str());
}
}
if(i != rec.end()) {
Expand Down

0 comments on commit 7032ab2

Please sign in to comment.