]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Accept "sealed" for transformed records and compact classes
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 30 Oct 2021 07:33:34 +0000 (09:33 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sun, 14 Nov 2021 11:39:13 +0000 (12:39 +0100)
vala/valagirparser.vala

index 098e69a95e32291d2297628b2bfdc198ca3a65a3..d59114020595c5fa22c8201a468cd5f5f69f4019 100644 (file)
@@ -3557,6 +3557,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;