diff options
author | Luca Bruno <lucabru@src.gnome.org> | 2011-05-24 20:10:05 +0200 |
---|---|---|
committer | Luca Bruno <lucabru@src.gnome.org> | 2011-05-24 20:10:05 +0200 |
commit | 4713308b17d4059b4c1132cde2bc1f27a94e83cb (patch) | |
tree | 32ead984aaae35f19dfb074cff308409de4f31d1 | |
parent | 14b99b59b6c4b8ad161249d25cd928c8710b0f6b (diff) | |
download | vala-4713308b17d4059b4c1132cde2bc1f27a94e83cb.tar.gz |
girparser: Do not assume method with same name of property is a getter
-rw-r--r-- | vala/valagirparser.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 3afc6c4d0..a1038c290 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -687,8 +687,6 @@ public class Vala.GirParser : CodeVisitor { parser.process_async_method (this); } } else if (symbol is Property) { - var getter = parent.lookup ("get_%s".printf (name)); - var setter = parent.lookup ("set_%s".printf (name)); var colliding = parent.lookup_all (name); foreach (var node in colliding) { if (node.symbol is Signal) { @@ -696,10 +694,12 @@ public class Vala.GirParser : CodeVisitor { node.processed = true; node.merged = true; } else if (node.symbol is Method) { - // try assuming it's the getter - getter = node; + // getter in C, but not in Vala + node.merged = true; } } + var getter = parent.lookup ("get_%s".printf (name)); + var setter = parent.lookup ("set_%s".printf (name)); var prop = (Property) symbol; if (prop.no_accessor_method) { // property getter and setter must both match, otherwise it's NoAccessorMethod |