aboutsummaryrefslogtreecommitdiffstats
path: root/typing.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-27 03:07:33 +0000
committerDavid Robillard <d@drobilla.net>2009-06-27 03:07:33 +0000
commit14a96af1b4554e75506621c3cc9b2c107f01a119 (patch)
tree7f1ef1d3c7bbb0e3af10b9664c9cbbee57dea0a1 /typing.cpp
parent9978c2ea1b408fb295c82577d7a14bf2d54cdb3b (diff)
downloadresp-14a96af1b4554e75506621c3cc9b2c107f01a119.tar.gz
resp-14a96af1b4554e75506621c3cc9b2c107f01a119.tar.bz2
resp-14a96af1b4554e75506621c3cc9b2c107f01a119.zip
Fix substitution of call argument types to generic function type to work with expressions (e.g. fix inferring return type from the return type of a parameter).
git-svn-id: http://svn.drobilla.net/resp/tuplr@154 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'typing.cpp')
-rw-r--r--typing.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/typing.cpp b/typing.cpp
index 4781b2e..cfc1104 100644
--- a/typing.cpp
+++ b/typing.cpp
@@ -115,7 +115,8 @@ AFn::constrain(TEnv& tenv, Constraints& c) const
subst = tsubst;
}
- c.constrain(tenv, this, new AType(*genericType));
+ AType* t = new AType(*genericType); // FIXME: deep copy
+ c.constrain(tenv, this, t);
}
void