I am failing to crash my program. What am I doing wrong?
var runtime_known = false;
runtime_known = !runtime_known;
const foo: i32 = if (runtime_known) undefined else 69;
if (foo == 42) {
std.debug.print("==42: {}\n", .{ foo });
}
if (foo != 43) {
std.debug.print("!=43: {}\n", .{ foo });
}
Output:
!=43: 1
It does not crash. It just uses garbage value.
P.S. I wonder why the garbage is not 0xAA pattern.