diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-04-04 19:36:56 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-04-04 19:36:56 +0000 |
commit | 73be7b6b5a9c98cc5a32dcfb3050b9656bf10243 (patch) | |
tree | 5421477844240ad71493ee01a85a4a8a5369d92d /src/expr/mkexpr | |
parent | 3e27983545a25f3acc3bf7c7dbdf0ec1fe3219ca (diff) |
Recommit revision 365 (undoing revision 375, which reverted revision 365).
Fix the case in NodeBuilderBlack that triggered bug #82. (Fixes bug #82.)
This also fixes regression failures from this morning (2010 Apr 4), in
the optimized builds, for which a fix was included in 365 and reverted
in 375. They looked like this:
In ExprBlack::testGetConst:
/usr/local/share/cvc4/src/cvc4-2010-04-04/builds/x86_64-unknown-linux-gnu/production/../../../test/unit/expr/expr_black.h:377: Error: Expected (a->getConst<Kind>()) to throw (IllegalArgumentException) but it didn't throw
/usr/local/share/cvc4/src/cvc4-2010-04-04/builds/x86_64-unknown-linux-gnu/production/../../../test/unit/expr/expr_black.h:378: Error: Expected (b->getConst<Kind>()) to throw (IllegalArgumentException) but it didn't throw
[etc..]
Diffstat (limited to 'src/expr/mkexpr')
-rwxr-xr-x | src/expr/mkexpr | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/expr/mkexpr b/src/expr/mkexpr index de6de014d..6508f8121 100755 --- a/src/expr/mkexpr +++ b/src/expr/mkexpr @@ -129,6 +129,9 @@ $2 const & Expr::getConst< $2 >() const; getConst_implementations="${getConst_implementations} template <> $2 const & Expr::getConst() const { + // check even for production builds + CheckArgument(getKind() == ::CVC4::kind::$1, *this, + \"Improper kind for getConst<$2>()\"); return d_node->getConst< $2 >(); } " |