diff options
Diffstat (limited to 'typing.cpp')
-rw-r--r-- | typing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -55,7 +55,7 @@ ATuple::constrain(TEnv& tenv, Constraints& c) const void AClosure::constrain(TEnv& tenv, Constraints& c) const { - AType* genericType; + const AType* genericType; TEnv::GenericTypes::const_iterator gt = tenv.genericTypes.find(this); if (gt != tenv.genericTypes.end()) { genericType = gt->second; @@ -116,7 +116,7 @@ AClosure::constrain(TEnv& tenv, Constraints& c) const subst = new Subst(tsubst); } - c.constrain(tenv, this, genericType); + c.constrain(tenv, this, new AType(*genericType)); } void |