aboutsummaryrefslogtreecommitdiffstats
path: root/src/constrain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/constrain.cpp')
-rw-r--r--src/constrain.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/constrain.cpp b/src/constrain.cpp
index bdabc52..6f68b4c 100644
--- a/src/constrain.cpp
+++ b/src/constrain.cpp
@@ -149,14 +149,13 @@ AFn::constrain(TEnv& tenv, Constraints& c) const
at(i)->constrain(tenv, cp);
AType* bodyT = tenv.var(at(e-1));
- Subst tsubst = unify(cp);
+ subst = unify(cp);
genericType = tup<AType>(loc, tenv.penv.sym("Fn"),
- tsubst.apply(protT), tsubst.apply(bodyT), 0);
+ subst.apply(protT), subst.apply(bodyT), 0);
tenv.genericTypes.insert(make_pair(this, genericType));
Object::pool.addRoot(genericType);
tenv.pop();
- subst = tsubst;
}
AType* t = new AType(*genericType); // FIXME: deep copy