diff options
author | Corentin Noël <corentin.noel@collabora.com> | 2020-10-15 10:35:25 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-05-03 09:11:56 +0200 |
commit | f904c7e269c7f7b0a6dcefa4f8f892b981a71917 (patch) | |
tree | 6f750c74fa72e6c05bb946b9bbeb33e165f1a406 /vala/valaforeachstatement.vala | |
parent | 14481195e5ba14347b7c46c0863704843ea5a04b (diff) | |
download | vala-f904c7e269c7f7b0a6dcefa4f8f892b981a71917.tar.gz |
vala: Add foreach statement support for GLib.GenericArray
It is now possible to use foreach with a GLib.GenericArray type
Diffstat (limited to 'vala/valaforeachstatement.vala')
-rw-r--r-- | vala/valaforeachstatement.vala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala index 0af0b52ba..d18de773e 100644 --- a/vala/valaforeachstatement.vala +++ b/vala/valaforeachstatement.vala @@ -180,7 +180,8 @@ public class Vala.ForeachStatement : Block { array_type.inline_allocated = false; return check_without_iterator (context, collection_type, array_type.element_type); - } else if (context.profile == Profile.GOBJECT && (collection_type.compatible (context.analyzer.glist_type) || collection_type.compatible (context.analyzer.gslist_type))) { + } else if (context.profile == Profile.GOBJECT && (collection_type.compatible (context.analyzer.glist_type) + || collection_type.compatible (context.analyzer.gslist_type) || collection_type.compatible (context.analyzer.genericarray_type))) { if (collection_type.get_type_arguments ().size != 1) { error = true; Report.error (collection.source_reference, "missing type argument for collection"); |