From: Jürg Billeter Date: Sat, 20 Mar 2010 22:06:48 +0000 (+0100) Subject: Check rank when checking array type compatibility X-Git-Tag: 0.8.0~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=168baaf662955ad1ca1040268c96bab06142f3d2;p=thirdparty%2Fvala.git Check rank when checking array type compatibility Fixes bug 577222. --- diff --git a/vala/valaarraytype.vala b/vala/valaarraytype.vala index 2ed20f227..9561a610a 100644 --- a/vala/valaarraytype.vala +++ b/vala/valaarraytype.vala @@ -1,6 +1,6 @@ /* valaarraytype.vala * - * Copyright (C) 2007-2009 Jürg Billeter + * Copyright (C) 2007-2010 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -195,6 +195,10 @@ public class Vala.ArrayType : ReferenceType { return false; } + if (target_array_type.rank != rank) { + return false; + } + if (element_type.compatible (target_array_type.element_type) && target_array_type.element_type.compatible (element_type)) { return true;