]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GObject: Check for incompatible properties in constructor chain up
authorJürg Billeter <j@bitron.ch>
Sat, 16 Oct 2010 12:18:08 +0000 (14:18 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 16 Oct 2010 12:18:08 +0000 (14:18 +0200)
Fixes bug 622119.

codegen/valagobjectmodule.vala

index f30077cbd492bd0e5a28f1835e20692554f76763..89c483421f0cec6670b11f30e54c0be6e3a27e85 100644 (file)
@@ -772,6 +772,10 @@ public class Vala.GObjectModule : GTypeModule {
                                                Report.error (arg.source_reference, "Property `%s' not found in `%s'".printf (named_argument.name, current_class.get_full_name ()));
                                                break;
                                        }
+                                       if (!is_gobject_property (prop)) {
+                                               Report.error (arg.source_reference, "Property `%s' not supported in Object (property: value) constructor chain up".printf (named_argument.name));
+                                               break;
+                                       }
                                        if (!arg.value_type.compatible (prop.property_type)) {
                                                Report.error (arg.source_reference, "Cannot convert from `%s' to `%s'".printf (arg.value_type.to_string (), prop.property_type.to_string ()));
                                                break;