-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.
Milestone
Description
I'm not sure how to explain it but here's a minimal repro:
pub fn format(comptime fmt: []const u8, args: var) void {
suspend; // commenting this out works
inline for (fmt) |c| {
switch (c) {
'c' => formatType(args[0], "c"),
else => formatType(args[0], ""),
}
}
}
pub fn formatType(value: var, comptime fmt: []const u8) void {
if (fmt.len > 0 and fmt[0] == 'c') {
// return formatType(value, ""); // replacing the bottom line with this works
return format("}", .{value});
}
}
test "kablamo" {
// const value = 'a'; // replacing the bottom line with this works
const value: u8 = 'a';
_ = async format("c", .{value});
}Assertion failed at ~/projects/zig/src/analyze.cpp:9037 in resolve_llvm_types. This is a bug in the Zig compiler.
Unable to dump stack trace: debug info stripped
Aborted
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.