| ... | @@ -987,6 +987,10 @@ test "enum literal casting to tagged union" { | ... | @@ -987,6 +987,10 @@ test "enum literal casting to tagged union" { |
| 987 | const Bar = enum { A, B, C, D }; | 987 | const Bar = enum { A, B, C, D }; |
| 988 | | 988 | |
| 989 | test "enum literal casting to error union with payload enum" { | 989 | test "enum literal casting to error union with payload enum" { |
| | 990 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 991 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| | 992 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| | 993 | |
| 990 | var bar: error{B}!Bar = undefined; | 994 | var bar: error{B}!Bar = undefined; |
| 991 | bar = .B; // should never cast to the error set | 995 | bar = .B; // should never cast to the error set |
| 992 | | 996 | |