aboutsummaryrefslogtreecommitdiffstats
path: root/typing.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-03-15 02:27:15 +0000
committerDavid Robillard <d@drobilla.net>2009-03-15 02:27:15 +0000
commit59117fc8bcd610697a45c0013fc7450de2ee512f (patch)
treed475c5d743cc2defec2db5d34c72ae8888170d5b /typing.cpp
parentb2c71ba7fd851af043cebde347647ff82eb828d6 (diff)
downloadresp-59117fc8bcd610697a45c0013fc7450de2ee512f.tar.gz
resp-59117fc8bcd610697a45c0013fc7450de2ee512f.tar.bz2
resp-59117fc8bcd610697a45c0013fc7450de2ee512f.zip
Make TEnv strictly keyed by ASymbol.
Prettier casting. git-svn-id: http://svn.drobilla.net/resp/tuplr@93 ad02d1e2-f140-0410-9f75-f8b11f17cedd
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);
}