diff options
author | David Robillard <d@drobilla.net> | 2009-03-15 04:24:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-03-15 04:24:23 +0000 |
commit | e4943a76e19b442e4cd7b1cf921127ff633d9c13 (patch) | |
tree | a0260377d6ab834ac1a059937230186adbc8b806 /typing.cpp | |
parent | 361cf8ee32179f529555d992ffe17c89ca642ddb (diff) | |
download | resp-e4943a76e19b442e4cd7b1cf921127ff633d9c13.tar.gz resp-e4943a76e19b442e4cd7b1cf921127ff633d9c13.tar.bz2 resp-e4943a76e19b442e4cd7b1cf921127ff633d9c13.zip |
Fix polymorphism.
git-svn-id: http://svn.drobilla.net/resp/tuplr@95 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'typing.cpp')
-rw-r--r-- | typing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |