]> 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>
Sat, 30 Oct 2021 10:46:45 +0000 (12:46 +0200)
vala/valagirparser.vala

index 31b8ad4c619fe4b4d5242c93ac995b8a8590b9bc..6a4b572afe0fd18cc454f1bfb700efacdd89119b 100644 (file)
@@ -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;