stage2: omit Decl compile errors from failed AstGen files
Just like when new parse errors occur during an update, when new AstGen errors occur during an update, we do not reveal compile errors for Decl objects which are inside of a newly failed File. Once the File passes AstGen successfully, it will be compared with the previously succeeded ZIR and the saved Decl compile errors will be handled properly.
This commit is contained in:
@@ -1138,6 +1138,13 @@ pub const Scope = struct {
|
||||
const loc = std.zig.findLineColumn(file.source.bytes, src);
|
||||
std.debug.print("{s}:{d}:{d}\n", .{ file.sub_file_path, loc.line + 1, loc.column + 1 });
|
||||
}
|
||||
|
||||
pub fn okToReportErrors(file: File) bool {
|
||||
return switch (file.status) {
|
||||
.parse_failure, .astgen_failure => false,
|
||||
else => true,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
/// This is the context needed to semantically analyze ZIR instructions and
|
||||
|
||||
Reference in New Issue
Block a user