]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: 'construct' is not supported in POSIX profile
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 19 Jul 2019 17:53:45 +0000 (19:53 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 19 Jul 2019 17:53:45 +0000 (19:53 +0200)
This fixes criticals like
    vala_class_real_is_subtype_of: assertion 't != NULL' failed

Regession of 6c8c75f59024b32230b1c13ea344a568f19b86df

vala/valapropertyaccessor.vala

index 7603a0492714e9f95d9c809d4cefa37f6f924d39..5326ab64a90a38c90732a318d42cbd53960444df 100644 (file)
@@ -201,7 +201,11 @@ public class Vala.PropertyAccessor : Subroutine {
                        return false;
                }
 
-               if (construction && !((TypeSymbol) prop.parent_symbol).is_subtype_of (context.analyzer.object_type)) {
+               if (context.profile == Profile.POSIX && construction) {
+                       error = true;
+                       Report.error (source_reference, "`construct' is not supported in POSIX profile");
+                       return false;
+               } else if (construction && !((TypeSymbol) prop.parent_symbol).is_subtype_of (context.analyzer.object_type)) {
                        error = true;
                        Report.error (source_reference, "construct properties require `GLib.Object'");
                        return false;