summaryrefslogtreecommitdiff
path: root/src/expr
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2010-05-05 19:06:07 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2010-05-05 19:06:07 +0000
commit9a76c8034cadc11b1528be8727f25693f823fb21 (patch)
treee6c81952013d82986e4d597a23c018b2abc912da /src/expr
parentfec2b5751108088ff651ce6eed09bf3aa65f281e (diff)
bug fixes for types, old unit tests for types work now
Diffstat (limited to 'src/expr')
-rw-r--r--src/expr/expr_template.cpp5
-rw-r--r--src/expr/expr_template.h3
-rw-r--r--src/expr/type.cpp2
3 files changed, 9 insertions, 1 deletions
diff --git a/src/expr/expr_template.cpp b/src/expr/expr_template.cpp
index a1be2ece8..876b400fe 100644
--- a/src/expr/expr_template.cpp
+++ b/src/expr/expr_template.cpp
@@ -38,6 +38,11 @@ std::ostream& operator<<(std::ostream& out, const Expr& e) {
return out;
}
+TypeCheckingException::TypeCheckingException(const TypeCheckingException& t)
+: Exception(t.d_msg), d_expr(new Expr(t.getExpression()))
+ {}
+
+
TypeCheckingException::TypeCheckingException(const Expr& expr, std::string message)
: Exception(message), d_expr(new Expr(expr))
{
diff --git a/src/expr/expr_template.h b/src/expr/expr_template.h
index 914d47959..ceef80292 100644
--- a/src/expr/expr_template.h
+++ b/src/expr/expr_template.h
@@ -56,6 +56,9 @@ protected:
public:
+ /** Copy constructor */
+ TypeCheckingException(const TypeCheckingException& t);
+
/** Destructor */
~TypeCheckingException() throw ();
diff --git a/src/expr/type.cpp b/src/expr/type.cpp
index 521e177d3..af333f9d3 100644
--- a/src/expr/type.cpp
+++ b/src/expr/type.cpp
@@ -118,7 +118,7 @@ Type::operator IntegerType() const throw (AssertionException) {
/** Is this the real type? */
bool Type::isReal() const {
NodeManagerScope nms(d_nodeManager);
- return d_typeNode->isInteger();
+ return d_typeNode->isReal();
}
/** Cast to a real type */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback