From d93000c4b5ff7b3dda0e59a4d333b0463e745e04 Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 16:14:02 +0330 Subject: include: written inside a function body is 'include is top level only' (appendix b.2.9) --- src/compiler/builtins.zc | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/compiler/builtins.zc b/src/compiler/builtins.zc index d04c444..d6a58fb 100644 --- a/src/compiler/builtins.zc +++ b/src/compiler/builtins.zc @@ -312,6 +312,7 @@ int inc_compile(char* buf, char* name, char*.d dir) { int kw_include() { int pp, sv; char* path; char* buf; stmtonly(); + if (infn) { die("include is top level only"); return 0; } // appendix b.2.9 next(); if (tk == T_ID) { while (1) { -- cgit v1.2.3