[vala/0.36: 155/212] girparser: Set NoAccessorMethod for non-readable and construct-only properties



commit 137cf160b74948e068260cc89aa62326c852f640
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Jan 20 10:41:43 2018 +0100

    girparser: Set NoAccessorMethod for non-readable and construct-only properties

 vala/valagirparser.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 22c3dd4..b71664c 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]