diff options
author | David Robillard <d@drobilla.net> | 2009-03-15 02:27:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-03-15 02:27:15 +0000 |
commit | 59117fc8bcd610697a45c0013fc7450de2ee512f (patch) | |
tree | d475c5d743cc2defec2db5d34c72ae8888170d5b /typing.cpp | |
parent | b2c71ba7fd851af043cebde347647ff82eb828d6 (diff) | |
download | resp-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.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); } |