]> 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>
Tue, 30 Jan 2018 07:13:21 +0000 (08:13 +0100)
vala/valagirparser.vala

index d169cd7b77c4de3d38d75e218fef82f44170a5a2..50b71f0945db9fb1549e5259beff254dfb0ad4a7 100644 (file)
@@ -988,7 +988,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