diff options
Diffstat (limited to 'src/constrain.cpp')
-rw-r--r-- | src/constrain.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/constrain.cpp b/src/constrain.cpp index 13bb9e8..e5a8dc4 100644 --- a/src/constrain.cpp +++ b/src/constrain.cpp @@ -187,7 +187,8 @@ AIf::constrain(TEnv& tenv, Constraints& c) const throw(Error) void ACons::constrain(TEnv& tenv, Constraints& c) const throw(Error) { - AType* type = tup<AType>(loc, tenv.Tup, 0); + ASymbol* sym = (*begin())->as<ASymbol*>(); + AType* type = tup<AType>(loc, new AType(sym), 0); for (const_iterator i = begin() + 1; i != end(); ++i) { (*i)->constrain(tenv, c); type->push_back(const_cast<AType*>(tenv.var(*i))); |