diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-07-19 19:53:45 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2019-07-19 19:53:45 +0200 |
commit | 7a2946ac27443bcae0fe3a26cf615128e399fee6 (patch) | |
tree | 9b5b3348d12a009c229c1806c2b9e6e8fc03c0af /vala/valapropertyaccessor.vala | |
parent | b7d498c8bcea82f0055b2541c3ec48808f4c2d47 (diff) | |
download | vala-7a2946ac27443bcae0fe3a26cf615128e399fee6.tar.gz |
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
Diffstat (limited to 'vala/valapropertyaccessor.vala')
-rw-r--r-- | vala/valapropertyaccessor.vala | 6 |
1 files changed, 5 insertions, 1 deletions
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; |