[vala/staging: 3/4] girparser: Accept "sealed" for transformed records and compact classes




commit 8cdca068cb5b2a3af11ee529bd3b7df459a41b9c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Oct 30 09:33:34 2021 +0200

    girparser: Accept "sealed" for transformed records and compact classes

 vala/valagirparser.vala | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 31b8ad4c6..6a4b572af 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -3583,6 +3583,14 @@ public class Vala.GirParser : CodeVisitor {
                        } else {
                                cl.set_attribute ("Compact", true);
                        }
+                       if (metadata.has_argument (ArgumentType.SEALED) && metadata.get_bool 
(ArgumentType.SEALED)) {
+                               if (cl.is_compact) {
+                                       cl.set_attribute_bool ("Compact", "opaque", true);
+                               } else {
+                                       cl.is_sealed = true;
+                               }
+                       }
+
                        current.symbol = cl;
                } else {
                        cl = (Class) current.symbol;


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