stage2: improve AstGen FileNotFound error message

Partially addresses #9203. It fixes the first case, but not the second
one mentioned in the issue.
This commit is contained in:
Andrew Kelley
2021-07-02 15:27:00 -07:00
parent 5103053977
commit d979dd9b58
7 changed files with 111 additions and 34 deletions
+1 -2
View File
@@ -4976,9 +4976,8 @@ pub fn addCases(ctx: *TestContext) !void {
ctx.objErrStage1("bad import",
\\const bogus = @import("bogus-does-not-exist.zig",);
\\export fn entry() void { bogus.bogo(); }
, &[_][]const u8{
"tmp.zig:1:15: error: unable to find 'bogus-does-not-exist.zig'",
"tmp.zig:1:23: error: unable to load '${DIR}bogus-does-not-exist.zig': FileNotFound",
});
ctx.objErrStage1("undeclared identifier",