diff options
| author | 2026-10-14 16:14:02 +0330 | |
|---|---|---|
| committer | 2026-10-14 16:14:02 +0330 | |
| commit | d93000c4b5ff7b3dda0e59a4d333b0463e745e04 (patch) | |
| tree | 0a244d9e379794e2240b2c876f1a029fa34a8d27 /src/compiler | |
| parent | globals: a float or f32 global takes a float literal initializer (appendix b.... (diff) | |
include: written inside a function body is 'include is top level only' (appendix b.2.9)
Diffstat (limited to 'src/compiler')
| -rw-r--r-- | src/compiler/builtins.zc | 1 |
1 files changed, 1 insertions, 0 deletions
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) { |
