]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Report error when using `construct' with incompatible properties
authorJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 22:02:51 +0000 (23:02 +0100)
committerJürg Billeter <j@bitron.ch>
Sat, 20 Mar 2010 22:02:51 +0000 (23:02 +0100)
Fixes bug 574146.

codegen/valaccodebasemodule.vala

index 4eecd38094454ca2911f97bfe41f73b2033f2598..f134d79976e869dda4e9286bd592e09f1baa61cd 100644 (file)
@@ -1452,6 +1452,10 @@ internal class Vala.CCodeBaseModule : CCodeModule {
                        Report.error (acc.source_reference, "construct properties require GLib.Object");
                        acc.error = true;
                        return;
+               } else if (acc.construction && !is_gobject_property (prop)) {
+                       Report.error (acc.source_reference, "construct properties not supported for specified property type");
+                       acc.error = true;
+                       return;
                }
 
                // do not declare overriding properties and interface implementations