diff options
author | David Robillard <d@drobilla.net> | 2009-06-27 03:07:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-27 03:07:33 +0000 |
commit | 14a96af1b4554e75506621c3cc9b2c107f01a119 (patch) | |
tree | 7f1ef1d3c7bbb0e3af10b9664c9cbbee57dea0a1 /tuplr.cpp | |
parent | 9978c2ea1b408fb295c82577d7a14bf2d54cdb3b (diff) | |
download | resp-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 'tuplr.cpp')
-rw-r--r-- | tuplr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -250,7 +250,8 @@ eval(CEnv& cenv, const string& name, istream& is) result->constrain(cenv.tenv, c); // Constrain types cenv.tsubst = Subst::compose(cenv.tsubst, TEnv::unify(c)); // Solve type constraints resultType = cenv.type(result); - result->lift(cenv); // Lift functions + if (resultType->concrete()) + result->lift(cenv); // Lift functions exprs.push_back(make_pair(exp, result)); // Add definitions as GC roots |