summaryrefslogtreecommitdiff
path: root/vala
diff options
context:
space:
mode:
authorFrederik Zipp <fzipp@gmx.de>2010-08-01 12:54:37 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2023-01-11 19:54:08 +0100
commit58dcad084f427585994ab66904436e1bd0e0b2a1 (patch)
tree7e065d02ee93732615fbf1272630eb8685e9d50d /vala
parent4bdb3e7301c59a32216ff383c23a4bdcf70fa268 (diff)
downloadvala-58dcad084f427585994ab66904436e1bd0e0b2a1.tar.gz
codegen: Add foreach support for strings
Fixes https://gitlab.gnome.org/GNOME/vala/issues/108
Diffstat (limited to 'vala')
-rw-r--r--vala/valaforeachstatement.vala2
1 files changed, 2 insertions, 0 deletions
diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala
index 84370e5b0..69d49eccb 100644
--- a/vala/valaforeachstatement.vala
+++ b/vala/valaforeachstatement.vala
@@ -194,6 +194,8 @@ public class Vala.ForeachStatement : Block {
return check_without_iterator (context, collection_type, collection_type.get_type_arguments ().get (0));
} else if (context.profile == Profile.GOBJECT && collection_type.compatible (context.analyzer.gvaluearray_type)) {
return check_without_iterator (context, collection_type, context.analyzer.gvalue_type);
+ } else if (context.profile == Profile.GOBJECT && collection_type.compatible (context.analyzer.string_type)) {
+ return check_without_iterator (context, collection_type, context.analyzer.unichar_type);
} else {
return check_with_iterator (context, collection_type);
}