[vala/wip/foreach: 3/7] codegen: Report internal error for unsupported collection type in foreach
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/foreach: 3/7] codegen: Report internal error for unsupported collection type in foreach
- Date: Tue, 10 Nov 2020 07:47:00 +0000 (UTC)
commit fee58e01757124b0b96ca9c636a0a2a85c0c250a
Author: Corentin Noël <corentin elementary io>
Date: Mon Nov 9 13:52:53 2020 +0100
codegen: Report internal error for unsupported collection type in foreach
codegen/valaccodecontrolflowmodule.vala | 4 ++++
1 file changed, 4 insertions(+)
---
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 ()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]