mirror of
https://github.com/ziglang/zig.git
synced 2026-12-05 20:28:47 -05:00
don't crash when can't evaluate comptime expression with inferred type
Closes #15911.
This commit is contained in:
1 parent
32e719e070
commit
cd1417dbdf
3 files changed
+24
-3
No files matched your search
@@ -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