diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-03-17 19:59:20 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-17 19:59:20 -0700 |
| commit | 1d1364c3cd296d628501bce131513ce18d2055a3 (patch) | |
| tree | 1cbd0803b10a57c980edca7223875d15e5a41af9 /test/behavior/struct.zig | |
| parent | 46ba24010af521936e416160decb660fe56cb484 (diff) | |
| download | zig-1d1364c3cd296d628501bce131513ce18d2055a3.tar.gz zig-1d1364c3cd296d628501bce131513ce18d2055a3.zip | |
Sema: change how undefined is handled in coerce
Instead of doing it before the switch tower, do it afterwards, so that
special handling may be done before undefined gets casted to the
destination type.
In this case the special handling we want to do is *[N]T to []T setting
the slice length based on the array length, even when the array value is
undefined.
Diffstat (limited to 'test/behavior/struct.zig')
| -rw-r--r-- | test/behavior/struct.zig | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/behavior/struct.zig b/test/behavior/struct.zig index 2cda0ca3bd..da7d1d7420 100644 --- a/test/behavior/struct.zig +++ b/test/behavior/struct.zig @@ -1138,11 +1138,9 @@ test "packed struct with undefined initializers" { } test "for loop over pointers to struct, getting field from struct pointer" { - // When enabling this test, be careful. I have observed it to pass when compiling - // stage2 alone, but when using stage1 with -fno-stage1 -fLLVM it fails. - // Maybe eyeball the LLVM that it generates and run in valgrind, both the compiler - // and the generated test at runtime. - if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO const S = struct { const Foo = struct { |
