]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Support array concatenation for captured variables
authorJürg Billeter <j@bitron.ch>
Sat, 16 Oct 2010 17:48:36 +0000 (19:48 +0200)
committerJürg Billeter <j@bitron.ch>
Sat, 16 Oct 2010 17:48:36 +0000 (19:48 +0200)
Fixes bug 630159.

codegen/valaccodearraymodule.vala

index 63ada14b5edb5c2798309625d5f237272e7ebe43..4c11d4e48c794489ccf9489ff21311a111a32e10 100644 (file)
@@ -790,9 +790,8 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
                var element = binary.right;
 
                var array_var = assignment.left.symbol_reference;
-               var array_local = array_var as LocalVariable;
                if (array_type.rank == 1 && array_var != null && array_var.is_internal_symbol ()
-                   && ((array_var is LocalVariable && !array_local.captured) || array_var is Field)) {
+                   && (array_var is LocalVariable || array_var is Field)) {
                        // valid array add
                } else {
                        Report.error (assignment.source_reference, "Array concatenation not supported for public array variables and parameters");