From 3323d5c76cd5eb5362d6df5ae00aef1c4d567fe3 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Fri, 4 Aug 2023 15:45:25 +0100 Subject: Disallow `import` declarations within a `when` statement --- src/parser.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/parser.hpp') diff --git a/src/parser.hpp b/src/parser.hpp index fa169d3ad..109068da7 100644 --- a/src/parser.hpp +++ b/src/parser.hpp @@ -116,6 +116,7 @@ struct AstFile { bool allow_in_expr; // NOTE(bill): in expression are only allowed in certain cases bool in_foreign_block; bool allow_type; + bool in_when_statement; isize total_file_decl_count; isize delayed_decl_count; -- cgit v1.2.3