zig/test/cases/compile_errors/mult_on_undefined_value.zig
Andrew Kelley 9f4408d68b organize some compile error tests
Many of these tests check for the incorrect behavior of stage1 whereas
self-hosted correctly does not emit an error, so they are simply
deleted.

The remaining number of test cases within the stage1/ subdirectory is
reduced from 143 to 103.
2022-09-15 14:40:45 -04:00

11 lines
175 B
Zig

comptime {
var a: i64 = undefined;
_ = a * a;
}
// error
// backend=stage2
// target=native
//
// :3:13: error: use of undefined value here causes undefined behavior