]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vala: Only warn about imcompatible type of external construct property
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 17 Jun 2019 06:05:54 +0000 (08:05 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 17 Jun 2019 06:08:32 +0000 (08:08 +0200)
This is to reduce the initial fallout.

Fixes https://gitlab.gnome.org/GNOME/vala/issues/803

vala/valapropertyaccessor.vala

index 3c826737b7927687cde3c0a656ae37b390da75bf..7603a0492714e9f95d9c809d4cefa37f6f924d39 100644 (file)
@@ -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) {