From: Jürg Billeter Date: Sat, 16 Oct 2010 13:17:23 +0000 (+0200) Subject: Report error when trying to use stacked arrays X-Git-Tag: 0.11.1~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cc435dd6ec069b87e986fa454e80e5fe80a0df72;p=thirdparty%2Fvala.git Report error when trying to use stacked arrays Stacked array support was never completed. Report an error instead of generating incorrect C code. Fixes bug 546603, bug 548428, bug 548429, bug 565865, bug 565872, bug 571322, bug 572649, and bug 576611. --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index 9de9b539c..9d4ce7481 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -3949,7 +3949,9 @@ public class Vala.CCodeBaseModule : CodeGenerator { var array_type = type as ArrayType; if (array_type != null) { check_type (array_type.element_type); - if (array_type.element_type is DelegateType) { + if (array_type.element_type is ArrayType) { + Report.error (type.source_reference, "Stacked arrays are not supported"); + } else if (array_type.element_type is DelegateType) { var delegate_type = (DelegateType) array_type.element_type; if (delegate_type.delegate_symbol.has_target) { Report.error (type.source_reference, "Delegates with target are not supported as array element type");