-
-
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
Zig Version
0.10.0-dev.3028+5e4f27af9
Steps to Reproduce
const std = @import("std");
test {
var x: u32 = 1;
inline for ([_]u8{1, 2, 3}) |_| {
if (1 == 1) {
x = 0;
continue;
}
}
std.debug.assert(x == 0);
}Appears to be related to a bug encountered in #12111
Expected Behavior
Test should pass.
Actual Behavior
Test fails. It produces this AIR:
# Begin Function AIR: test.main:
...
%0 = alloc(*u32)
%2!= store(%0, %1!)
%44 = load(u32, %0!)
%47 = cmp_eq(%44!, %46!)
%48!= call(%43!, [%47!])
%49!= ret(@Zir.Inst.Ref.void_value)
# End Function AIR: test.mainReactions are currently unavailable
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.