]> 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>
Tue, 19 Oct 2010 18:57:23 +0000 (20:57 +0200)
Fixes bug 622119.

codegen/valagobjectmodule.vala

index 238411b29c74903ca5ee0461710a8ecde3b49281..2d36329a155d9a3623cfe8142c29fefec4e1162b 100644 (file)
@@ -815,6 +815,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;