summaryrefslogtreecommitdiff
path: root/vala/valaforeachstatement.vala
diff options
context:
space:
mode:
Diffstat (limited to 'vala/valaforeachstatement.vala')
-rw-r--r--vala/valaforeachstatement.vala11
1 files changed, 8 insertions, 3 deletions
diff --git a/vala/valaforeachstatement.vala b/vala/valaforeachstatement.vala
index 416fb55d2..d0e35485d 100644
--- a/vala/valaforeachstatement.vala
+++ b/vala/valaforeachstatement.vala
@@ -380,12 +380,17 @@ public class Vala.ForeachStatement : Block {
add_local_variable (collection_variable);
collection_variable.active = true;
- add_error_types (collection.get_error_types ());
- add_error_types (body.get_error_types ());
-
return !error;
}
+ public override void get_error_types (Collection<DataType> collection, SourceReference? source_reference = null) {
+ if (source_reference == null) {
+ source_reference = this.source_reference;
+ }
+ this.collection.get_error_types (collection, source_reference);
+ body.get_error_types (collection, source_reference);
+ }
+
public override void emit (CodeGenerator codegen) {
if (use_iterator) {
base.emit (codegen);