]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Support instance access in lambda expressions in property accessors
authorJürg Billeter <j@bitron.ch>
Tue, 30 Dec 2008 18:41:34 +0000 (18:41 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Tue, 30 Dec 2008 18:41:34 +0000 (18:41 +0000)
2008-12-30  Jürg Billeter  <j@bitron.ch>

* vala/valalambdaexpression.vala:

Support instance access in lambda expressions in property accessors

svn path=/trunk/; revision=2243

ChangeLog
vala/valalambdaexpression.vala

index ad14c3bccc1e47717bfa63323e7252a2142912c1..05fc8bd696984afb4d758c6e77c527e670915cfc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-30  Jürg Billeter  <j@bitron.ch>
+
+       * vala/valalambdaexpression.vala:
+
+       Support instance access in lambda expressions in property accessors
+
 2008-12-26  Jürg Billeter  <j@bitron.ch>
 
        * gobject/valaccodebasemodule.vala:
index 52415a91591d209e88fb3408d4106b821d405f19..f13e9588ebf56992653719f4a9b342ca08b9065c 100644 (file)
@@ -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;