[vala/0.44] vala: Only warn about imcompatible type of external construct property



commit 4ebf520eda1d6e5d6b065a3d821cf3d7f5f5d94f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Jun 17 08:05:54 2019 +0200

    vala: Only warn about imcompatible type of external construct property
    
    This is to reduce the initial fallout.
    
    Fixes https://gitlab.gnome.org/GNOME/vala/issues/803

 vala/valapropertyaccessor.vala | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/vala/valapropertyaccessor.vala b/vala/valapropertyaccessor.vala
index 3c826737b..7603a0492 100644
--- a/vala/valapropertyaccessor.vala
+++ b/vala/valapropertyaccessor.vala
@@ -206,9 +206,14 @@ public class Vala.PropertyAccessor : Subroutine {
                        Report.error (source_reference, "construct properties require `GLib.Object'");
                        return false;
                } else if (construction && !context.analyzer.is_gobject_property (prop)) {
-                       error = true;
-                       Report.error (source_reference, "construct properties not supported for specified 
property type");
-                       return false;
+                       //TODO Report an error for external property too
+                       if (external_package) {
+                               Report.warning (source_reference, "construct properties not supported for 
specified property type");
+                       } else {
+                               error = true;
+                               Report.error (source_reference, "construct properties not supported for 
specified property type");
+                               return false;
+                       }
                }
 
                if (body != null && prop.is_abstract) {


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