From 8f7ed82fdbfea13d9fce553dc42db5b8d33e4bd9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 9 Jan 2011 16:03:40 +0000 Subject: Set type of lifted closure component accesses. git-svn-id: http://svn.drobilla.net/resp/trunk@404 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/lift.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lift.cpp b/src/lift.cpp index e55bdfe..2d26ace 100644 --- a/src/lift.cpp +++ b/src/lift.cpp @@ -46,10 +46,12 @@ lift_symbol(CEnv& cenv, Code& code, const ASymbol* sym) throw() * to the closure (the calling lift_fn will use cenv.liftStack.top() * to construct the closure after the fn body has been lifted). */ - return tup(sym->loc, cenv.penv.sym("."), + const AST* dot = tup(sym->loc, cenv.penv.sym("."), cenv.penv.sym("_me"), new ALiteral(T_INT32, vars.index(sym) + 1, Cursor()), NULL); + cenv.setType(dot, cenv.type(sym)); + return dot; } } return sym; -- cgit v1.2.1