-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Closed
Copy link
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Description
test {
var a: error{ A, B }!u64 = 0;
var b = a catch |err| switch (err) {
error.A => 0,
else => unreachable,
};
_ = b;
}0 gets emitted to AIR as comptime_int which then causes coerce to hit unreachable when a value of comptime_int is not comptime known.
Happens in dwarf.zig when calling std.debug.dumpCurrentStackTrace on linux but is easily avoided with a simple cast.
Line 825 in e5d4a69
| error.MissingDebugInfo => 0, |
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.