From 7a2946ac27443bcae0fe3a26cf615128e399fee6 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Fri, 19 Jul 2019 19:53:45 +0200 Subject: [PATCH] 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 --- vala/valapropertyaccessor.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.47.2