aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-08-27 21:34:13 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-08-27 21:34:13 -0700
commitf30aa25cbf9c9a415963b4ea69d7efa09237a704 (patch)
treef0150470b35bb7b55450c54dbb4553e3cc11b29f /src/Module.zig
parentcfae70ec8e736af3fcd465c78bd80e160968eea8 (diff)
downloadzig-f30aa25cbf9c9a415963b4ea69d7efa09237a704.tar.gz
zig-f30aa25cbf9c9a415963b4ea69d7efa09237a704.zip
declarations may collide with primitives with @"" syntax
* stage2 AstGen: add missing compile error for declaring a local that shadows a primitive. Even with `@""` syntax, it may not have the same name as a primitive. * stage2 AstGen: add a compile error for a global declaration whose name matches a primitive. However it is allowed when using `@""` syntax. * stage1: delete all "declaration shadows primitive" compile errors because they are now handled by stage2 AstGen. * stage1/stage2 AstGen: notice when using `@""` syntax and: - treat `_` as a regular identifier - skip checking if an identifire is a primitive Check the new test cases for clarifications on semantics. closes #6062
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions