]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Set NoAccessorMethod for non-readable and construct-only properties
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 20 Jan 2018 09:41:43 +0000 (10:41 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 20 Jan 2018 09:41:43 +0000 (10:41 +0100)
vala/valagirparser.vala

index 7902e2d37f12a206038f0feb3313ce9158719079..2c94e249a1e086f0d70edf6b512d100e30044fe4 100644 (file)
@@ -999,7 +999,7 @@ public class Vala.GirParser : CodeVisitor {
                                                }
                                        }
 
-                                       prop.set_attribute ("NoAccessorMethod", false);
+                                       prop.set_attribute ("NoAccessorMethod", (readable == "0" && construct_only == "1"));
                                        if (prop.get_accessor != null) {
                                                var m = getter != null ? getter.symbol as Method : null;
                                                // ensure getter vfunc if the property is abstract