diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2017-05-08 13:46:22 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-05-08 08:25:18 +0200 |
commit | 489895fbd7a550e661f9f6ea19d3dcd25d0cc790 (patch) | |
tree | cbbf9a2ef40e0f5b7bee098798f0006ba3ed11cb /vala/valaforeachstatement.vala | |
parent | f7e70338aee8717f4b2050f442d9a6fc41b50d5d (diff) | |
download | vala-489895fbd7a550e661f9f6ea19d3dcd25d0cc790.tar.gz |
Reintroduce POSIX profile
This reverts commit ca020bf04a09fe16e5583eea5a3a341e7796bff5.
Diffstat (limited to 'vala/valaforeachstatement.vala')
-rw-r--r-- | vala/valaforeachstatement.vala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala index 4d928429f..416fb55d2 100644 --- a/vala/valaforeachstatement.vala +++ b/vala/valaforeachstatement.vala @@ -175,7 +175,7 @@ public class Vala.ForeachStatement : Block { array_type.inline_allocated = false; return check_without_iterator (context, collection_type, array_type.element_type); - } else if (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))) { if (collection_type.get_type_arguments ().size != 1) { error = true; Report.error (collection.source_reference, "missing type argument for collection"); @@ -183,7 +183,7 @@ public class Vala.ForeachStatement : Block { } return check_without_iterator (context, collection_type, collection_type.get_type_arguments ().get (0)); - } else if (collection_type.compatible (context.analyzer.gvaluearray_type)) { + } 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 { return check_with_iterator (context, collection_type); |