aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-07-19 16:56:44 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-07-19 16:56:44 -0400
commitaf8661405b908c0abfc191501a8ad1a59a54e86a (patch)
treed76bde495229dc37b7436c547afe5f03aee6b61d /src/codegen.cpp
parent1d07bbbef23993338b231fbd9d7bbf5a349c5f31 (diff)
downloadzig-af8661405b908c0abfc191501a8ad1a59a54e86a.tar.gz
zig-af8661405b908c0abfc191501a8ad1a59a54e86a.zip
fix usingnamespace
It used to be that usingnamespace was only allowed at top level. This made it OK to put the state inside the AST node data structure. However, now usingnamespace can occur inside any aggregate data structure, and therefore the state must be in the TopLevelDeclaration rather than in the AST node. There were two other problems with the usingnamespace implementation: * It was passing the wrong destination ScopeDecl, so it could cause an incorrect error such as "import of file outside package path". * When doing `usingnamespace` on a file that already had `pub usingnamespace` in it would "steal" the usingnamespace, causing incorrect "use of undeclared identifier" errors in the target file. closes #2632 closes #2580
Diffstat (limited to 'src/codegen.cpp')
0 files changed, 0 insertions, 0 deletions