From: Rico Tzschichholz Date: Fri, 19 Jul 2019 17:53:45 +0000 (+0200) Subject: vala: 'construct' is not supported in POSIX profile X-Git-Tag: 0.45.90~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a2946ac27443bcae0fe3a26cf615128e399fee6;p=thirdparty%2Fvala.git vala: 'construct' is not supported in POSIX profile This fixes criticals like vala_class_real_is_subtype_of: assertion 't != NULL' failed Regession of 6c8c75f59024b32230b1c13ea344a568f19b86df --- diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala index 7603a0492..5326ab64a 100644 --- a/vala/valapropertyaccessor.vala +++ b/vala/valapropertyaccessor.vala @@ -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;