mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03: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.
This commit is contained in:
@@ -8846,4 +8846,14 @@ pub fn addCases(ctx: *TestContext) !void {
|
||||
, &[_][]const u8{
|
||||
"error: invalid operands to binary expression: 'f32' and 'f32'",
|
||||
});
|
||||
|
||||
ctx.objErrStage1("undeclared identifier in unanalyzed branch",
|
||||
\\export fn a() void {
|
||||
\\ if (false) {
|
||||
\\ lol_this_doesnt_exist = nonsense;
|
||||
\\ }
|
||||
\\}
|
||||
, &[_][]const u8{
|
||||
"tmp.zig:3:9: error: use of undeclared identifier 'lol_this_doesnt_exist'",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user