diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-04-01 06:59:18 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-04-01 06:59:18 +0000 |
commit | c49e8a66f30413adc802c7200ec02c68e33feae6 (patch) | |
tree | bab593196b862b2e22f5cc07cf3d9f8a97e86e16 /src/expr/mkexpr | |
parent | f208251e33814430decb89c2c9001b5a675402f9 (diff) |
* Minor code formatting stuff in src/expr/type.{h,cpp}. Concluded
Type code review and closed bug #25.
* Do assertions on Expr creation (public library interface) even when
assertions are off. Also a similar check for proper kind (in public
interface) when Expr::getConst<>() is called. This fixes a unit
test that was failing in production builds (an exception wasn't
thrown but should have been).
* kind::XOR must have exactly 2 arguments, not 2-or-more.
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 >(); } " |