| ... | @@ -35,7 +35,8 @@ pub fn a( | ... | @@ -35,7 +35,8 @@ pub fn a( |
| 35 | _ = flag_a; | 35 | _ = flag_a; |
| 36 | // With this bug present, `flag_b` would actually contain the value 17. | 36 | // With this bug present, `flag_b` would actually contain the value 17. |
| 37 | // Note: this bug only presents itself on debug mode. | 37 | // Note: this bug only presents itself on debug mode. |
| 38 | try std.testing.expect(@ptrCast(*const u8, &flag_b).* == 1); | 38 | const flag_b_byte: u8 = @boolToInt(flag_b); |
| | 39 | try std.testing.expect(flag_b_byte == 1); |
| 39 | } | 40 | } |
| 40 | | 41 | |
| 41 | pub fn b(x: *X) !void { | 42 | pub fn b(x: *X) !void { |