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 d6f7acc..105140e 100644
--- a/typing.cpp
+++ b/typing.cpp
@@ -110,7 +110,7 @@ AClosure::constrain(TEnv& tenv, Constraints& c) const
genericType = new AType(loc, tenv.penv.sym("Fn"),
tsubst.apply(protT), tsubst.apply(bodyT), 0);
tenv.genericTypes.insert(make_pair(this, genericType));
- tenv.def(this, genericType);
+ //tenv.def(this, genericType);
tenv.pop();
subst = new Subst(tsubst);
@@ -141,7 +141,7 @@ ADefinition::constrain(TEnv& tenv, Constraints& c) const
if (!dynamic_cast<const ASymbol*>(at(1)))
throw Error("`def' name is not a symbol", loc);
AType* tvar = tenv.var(at(2));
- tenv.def(at(1), tvar);
+ tenv.def(at(1)->as<ASymbol*>(), tvar);
at(2)->constrain(tenv, c);
c.constrain(tenv, this, tvar);
}