[vala] Fix foreach for inline-allocated arrays
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vala] Fix foreach for inline-allocated arrays
- Date: Fri, 29 Jan 2010 21:41:24 +0000 (UTC)
commit d68c083d48d083b0f4b636da910c624a4d7ed040
Author: Jürg Billeter <j bitron ch>
Date: Fri Jan 29 22:35:50 2010 +0100
Fix foreach for inline-allocated arrays
Fixes bug 607547.
vala/valaforeachstatement.vala | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala
index b12440e..0975c82 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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]