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:
Andrew Kelley
2021-08-28 15:35:59 -07:00
parent c05a20fc8c
commit 332eafeb7f
18 changed files with 385 additions and 243 deletions
+10
View File
@@ -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'",
});
}