diff options
author | Corentin Noël <corentin@elementary.io> | 2020-11-09 13:52:53 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-11-10 09:14:29 +0100 |
commit | b57f7f23a93ecb6132207699551596dc35e0ea3c (patch) | |
tree | 30aa4326424dade10529c1941b4f077fd8fb5818 /codegen/valaccodecontrolflowmodule.vala | |
parent | d43edc5a6f17f5c2f515f6e659da83c73ce639fa (diff) | |
download | vala-b57f7f23a93ecb6132207699551596dc35e0ea3c.tar.gz |
codegen: Report internal error for unsupported collection type in foreach
Diffstat (limited to 'codegen/valaccodecontrolflowmodule.vala')
-rw-r--r-- | codegen/valaccodecontrolflowmodule.vala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/codegen/valaccodecontrolflowmodule.vala b/codegen/valaccodecontrolflowmodule.vala index df31fcef3..dbf64b759 100644 --- a/codegen/valaccodecontrolflowmodule.vala +++ b/codegen/valaccodecontrolflowmodule.vala @@ -338,6 +338,10 @@ public abstract class Vala.CCodeControlFlowModule : CCodeMethodModule { stmt.body.emit (this); ccode.close (); + } else { + Report.error (stmt.source_reference, "internal error: unsupported collection type"); + stmt.error = true; + return; } foreach (LocalVariable local in stmt.get_local_variables ()) { |