[vala] dova: Fix non-void lambda expressions
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] dova: Fix non-void lambda expressions
- Date: Sat, 3 Jul 2010 11:10:49 +0000 (UTC)
commit 57a20c1e5e7104ff69d9f15c20737c28350d81ef
Author: Jürg Billeter <j bitron ch>
Date: Sat Jul 3 09:57:37 2010 +0200
dova: Fix non-void lambda expressions
vala/valalambdaexpression.vala | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala
index 086b36f..ec6b9a1 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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]