aboutsummaryrefslogtreecommitdiffstats
path: root/typing.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-03-15 04:24:23 +0000
committerDavid Robillard <d@drobilla.net>2009-03-15 04:24:23 +0000
commite4943a76e19b442e4cd7b1cf921127ff633d9c13 (patch)
treea0260377d6ab834ac1a059937230186adbc8b806 /typing.cpp
parent361cf8ee32179f529555d992ffe17c89ca642ddb (diff)
downloadresp-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.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/typing.cpp b/typing.cpp
index e042283..086db79 100644
--- a/typing.cpp
+++ b/typing.cpp
@@ -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