From c80b61512a905e46e52f43e01c531a3ac4b8aeb5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 26 Dec 2012 00:38:09 +0000 Subject: Fix type constraints for lambdas with no arguments. git-svn-id: http://svn.drobilla.net/resp/trunk@447 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/constrain.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/constrain.cpp b/src/constrain.cpp index 3655396..66b4505 100644 --- a/src/constrain.cpp +++ b/src/constrain.cpp @@ -359,6 +359,8 @@ constrain_call(TEnv& tenv, Constraints& c, const ATuple* call) throw(Error) argsT.push_back(tenv.var(*i)); if (argsT.head) argsT.head->loc = call->loc; + else + argsT.head = new ATuple(NULL, NULL, Cursor()); c.constrain(tenv, head, tup(head->loc, tenv.Fn, argsT.head, retT, 0)); c.constrain(tenv, call, retT); } -- cgit v1.2.1