diff options
author | Jürg Billeter <j@bitron.ch> | 2010-07-03 09:57:37 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-07-03 12:47:58 +0200 |
commit | 57a20c1e5e7104ff69d9f15c20737c28350d81ef (patch) | |
tree | a57653738b9717cc03eb05ee1592be02699fcc9a /vala/valalambdaexpression.vala | |
parent | ac780b92d6b561f422e7935a8a9735464dc1540a (diff) | |
download | vala-57a20c1e5e7104ff69d9f15c20737c28350d81ef.tar.gz |
dova: Fix non-void lambda expressions
Diffstat (limited to 'vala/valalambdaexpression.vala')
-rw-r--r-- | vala/valalambdaexpression.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala index 086b36f31..ec6b9a148 100644 --- a/vala/valalambdaexpression.vala +++ b/vala/valalambdaexpression.vala @@ -162,6 +162,11 @@ public class Vala.LambdaExpression : Expression { } method.owner = analyzer.current_symbol.scope; + if (!(method.return_type is VoidType) && CodeContext.get ().profile == Profile.DOVA) { + method.result_var = new LocalVariable (method.return_type.copy (), "result", null, source_reference); + method.result_var.is_result = true; + } + var lambda_params = get_parameters (); Iterator<string> lambda_param_it = lambda_params.iterator (); |