diff options
author | Jürg Billeter <j@bitron.ch> | 2010-01-29 22:35:50 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2010-01-29 22:40:49 +0100 |
commit | d68c083d48d083b0f4b636da910c624a4d7ed040 (patch) | |
tree | 8205b1b0fc3b9c6a054b9ef331bcf1d4c96ec47b /vala/valaforeachstatement.vala | |
parent | 9a6f736d18b54bc33100697e46c8ad192e7a2783 (diff) | |
download | vala-d68c083d48d083b0f4b636da910c624a4d7ed040.tar.gz |
Fix foreach for inline-allocated arrays
Fixes bug 607547.
Diffstat (limited to 'vala/valaforeachstatement.vala')
-rw-r--r-- | vala/valaforeachstatement.vala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala index b12440e30..0975c82d4 100644 --- a/vala/valaforeachstatement.vala +++ b/vala/valaforeachstatement.vala @@ -1,6 +1,6 @@ /* valaforeachstatement.vala * - * Copyright (C) 2006-2009 Jürg Billeter + * Copyright (C) 2006-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 @@ -170,6 +170,9 @@ public class Vala.ForeachStatement : Block { if (collection_type.is_array ()) { var array_type = (ArrayType) collection_type; + // can't use inline-allocated array for temporary variable + array_type.inline_allocated = false; + return check_without_iterator (analyzer, collection_type, array_type.element_type); } else if (collection_type.compatible (analyzer.glist_type) || collection_type.compatible (analyzer.gslist_type)) { if (collection_type.get_type_arguments ().size != 1) { |