aboutsummaryrefslogtreecommitdiffstats
path: root/typing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'typing.cpp')
-rw-r--r--typing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/typing.cpp b/typing.cpp
index e042283..086db79 100644
--- a/typing.cpp
+++ b/typing.cpp
@@ -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