From ed914e42041806538f57750c8391fa77053d8c79 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Wed, 26 Sep 2012 03:50:57 +0000 Subject: Fix type checking for define-funs (resolves bug 398). (this commit was certified error- and warning-free by the test-and-commit script.) --- src/smt/smt_engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/smt') diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp index cedd866f9..ad72e0737 100644 --- a/src/smt/smt_engine.cpp +++ b/src/smt/smt_engine.cpp @@ -888,7 +888,7 @@ void SmtEngine::defineFunction(Expr func, // doesn't match the SMT-LIBv2 standard... if(formals.size() > 0) { Type rangeType = FunctionType(funcType).getRangeType(); - if(formulaType != rangeType) { + if(! formulaType.isComparableTo(rangeType)) { stringstream ss; ss << "Type of defined function does not match its declaration\n" << "The function : " << func << "\n" @@ -898,7 +898,7 @@ void SmtEngine::defineFunction(Expr func, throw TypeCheckingException(func, ss.str()); } } else { - if(formulaType != funcType) { + if(! formulaType.isComparableTo(funcType)) { stringstream ss; ss << "Declared type of defined constant does not match its definition\n" << "The constant : " << func << "\n" -- cgit v1.2.3