diff options
author | Princeton Ferro <princetonferro@gmail.com> | 2022-01-24 11:50:25 -0500 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2022-01-24 20:24:06 +0100 |
commit | 0db2ebd9035c95efa062ecab310bca88a70d8faf (patch) | |
tree | b7cc850d0b4a454738a11369ed5626366d27ca53 /vala/valaforeachstatement.vala | |
parent | ca3da69b2bda18b8b081c2dae48f2ccff93f165a (diff) | |
download | vala-0db2ebd9035c95efa062ecab310bca88a70d8faf.tar.gz |
vala: Add foreach statement support for GLib.Array
It is now possible to use foreach with a GLib.Array
Diffstat (limited to 'vala/valaforeachstatement.vala')
-rw-r--r-- | vala/valaforeachstatement.vala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala index 3d8ce2ba9..4daddcb84 100644 --- a/vala/valaforeachstatement.vala +++ b/vala/valaforeachstatement.vala @@ -181,7 +181,9 @@ public class Vala.ForeachStatement : Block { 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) || collection_type.compatible (context.analyzer.genericarray_type))) { + || collection_type.compatible (context.analyzer.gslist_type) + || collection_type.compatible (context.analyzer.genericarray_type) + || collection_type.compatible (context.analyzer.garray_type))) { if (collection_type.get_type_arguments ().size != 1) { error = true; Report.error (collection.source_reference, "missing type argument for collection"); |