[vala/0.44] vala: 'construct' is not supported in POSIX profile



commit 70b259432295ae55976e5e46e345ba2d64b8defa
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Jul 19 19:53:45 2019 +0200

    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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]