don't crash when can't evaluate comptime expression with inferred type
Closes #15911.
This commit is contained in:
@@ -6021,6 +6021,10 @@ pub fn errNoteNonLazy(
|
||||
comptime format: []const u8,
|
||||
args: anytype,
|
||||
) error{OutOfMemory}!void {
|
||||
if (src_loc.lazy == .unneeded) {
|
||||
assert(parent.src_loc.lazy == .unneeded);
|
||||
return;
|
||||
}
|
||||
const msg = try std.fmt.allocPrint(mod.gpa, format, args);
|
||||
errdefer mod.gpa.free(msg);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user