This website requires JavaScript.
About
Status
₊˚⊹Discord
Explore
Register
Sign in
Reference in a new issue
Blame
Copy permalink
Reference in a new issue
Copy permalink
DKB
/
zig
Star
0
Fork
You've already forked zig
0
mirror of
https://codeberg.org/ziglang/zig
synced
2026-11-18 07:05:05 +00:00
Code
Issues
Releases
Packages
Activity
b2e94de358
zig
/
test
/
behavior
/
usingnamespace.zig
77 lines
1.7 KiB
Raw
Normal View
History
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
2019-07-19 16:56:44 -04:00
Port more behavior tests
2022-02-22 14:15:09 +01:00
put the passing stage2 behavior tests back This mostly reverts commit 692c254336da71cbe21aaf9fbc21240fd1269b95. The test "for loop over pointers to struct, getting field from struct pointer" is still failing on the CI so that one is not moved over.
2021-11-30 16:14:18 -07:00
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
2019-07-19 16:56:44 -04:00
stage2: first pass at implementing usingnamespace Ran into a design flaw here which will need to get solved by having AstGen annotate ZIR with which instructions are closed over.
2021-08-28 15:35:59 -07:00
Don't warn about redeclaration for the same var node Closes #3316
2019-09-26 17:54:45 +02:00
stage2: first pass at implementing usingnamespace Ran into a design flaw here which will need to get solved by having AstGen annotate ZIR with which instructions are closed over.
2021-08-28 15:35:59 -07:00
Don't warn about redeclaration for the same var node Closes #3316
2019-09-26 17:54:45 +02:00
put the passing stage2 behavior tests back This mostly reverts commit 692c254336da71cbe21aaf9fbc21240fd1269b95. The test "for loop over pointers to struct, getting field from struct pointer" is still failing on the CI so that one is not moved over.
2021-11-30 16:14:18 -07:00
Port more behavior tests
2022-02-22 14:15:09 +01:00
put the passing stage2 behavior tests back This mostly reverts commit 692c254336da71cbe21aaf9fbc21240fd1269b95. The test "for loop over pointers to struct, getting field from struct pointer" is still failing on the CI so that one is not moved over.
2021-11-30 16:14:18 -07:00
Port more behavior tests
2022-02-22 14:15:09 +01:00
put the passing stage2 behavior tests back This mostly reverts commit 692c254336da71cbe21aaf9fbc21240fd1269b95. The test "for loop over pointers to struct, getting field from struct pointer" is still failing on the CI so that one is not moved over.
2021-11-30 16:14:18 -07:00
Sema: fix usingnamespace decl Value in wrong arena closes #11297
2022-03-30 17:20:12 -07:00