]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Forbid `resize' method for multi-dimensional array
authorSimon Werbeck <simon.werbeck@gmail.com>
Thu, 8 Nov 2012 19:25:03 +0000 (20:25 +0100)
committerJürg Billeter <j@bitron.ch>
Tue, 13 Nov 2012 20:12:33 +0000 (21:12 +0100)
Fixes bug 687943.

vala/valaarraytype.vala

index f1bcba10893627648b979b7aa01c519cf307f51e..b3767233529d19bbf4f17f66af8fb47628a69e7e 100644 (file)
@@ -71,6 +71,9 @@ public class Vala.ArrayType : ReferenceType {
                } else if (member_name == "move") {
                        return get_move_method ();
                } else if (member_name == "resize") {
+                       if (rank > 1) {
+                               return null;
+                       }
                        return get_resize_method ();
                }
                return null;