aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr.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 /tuplr.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 'tuplr.cpp')
-rw-r--r--tuplr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tuplr.cpp b/tuplr.cpp
index 7dd3e9b..5aaf54a 100644
--- a/tuplr.cpp
+++ b/tuplr.cpp
@@ -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