]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Report error when trying to use stacked arrays
authorJürg Billeter <j@bitron.ch>
Sat, 16 Oct 2010 13:17:23 +0000 (15:17 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 16 Oct 2010 13:17:23 +0000 (15:17 +0200)
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.

codegen/valaccodebasemodule.vala

index 9de9b539c7e49be8bac7033f8428676babc5b73f..9d4ce74815b2fd59ecb2dab75b108f3d6581c71e 100644 (file)
@@ -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");