From 5215d0e8b7747fe8399ff5ccde616b8787e53dde Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Tue, 30 Dec 2008 18:41:34 +0000 Subject: [PATCH] Support instance access in lambda expressions in property accessors MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 2008-12-30 Jürg Billeter * vala/valalambdaexpression.vala: Support instance access in lambda expressions in property accessors svn path=/trunk/; revision=2243 --- ChangeLog | 6 ++++++ vala/valalambdaexpression.vala | 10 +--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad14c3bc..05fc8bd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-30 Jürg Billeter + + * vala/valalambdaexpression.vala: + + Support instance access in lambda expressions in property accessors + 2008-12-26 Jürg Billeter * gobject/valaccodebasemodule.vala: diff --git a/vala/valalambdaexpression.vala b/vala/valalambdaexpression.vala index 52415a91..f13e9588 100644 --- a/vala/valalambdaexpression.vala +++ b/vala/valalambdaexpression.vala @@ -133,17 +133,9 @@ public class Vala.LambdaExpression : Expression { return false; } - bool in_instance_method = false; - var current_method = analyzer.find_current_method (); - if (current_method != null) { - in_instance_method = (current_method.binding == MemberBinding.INSTANCE); - } else { - in_instance_method = analyzer.is_in_constructor (); - } - var cb = (Delegate) ((DelegateType) target_type).delegate_symbol; method = new Method (get_lambda_name (analyzer), cb.return_type); - if (!cb.has_target || !in_instance_method) { + if (!cb.has_target || !analyzer.is_in_instance_method ()) { method.binding = MemberBinding.STATIC; } method.owner = analyzer.current_symbol.scope; -- 2.11.4.GIT