| 1 | const Payload = union { |
| 2 | int: i64, |
| 3 | float: f64, |
| 4 | boolean: bool, |
| 5 | }; |
| 6 | test "simple union" { |
| 7 | var payload = Payload{ .int = 1234 }; |
| 8 | payload.float = 12.34; |
| 9 | } |
| 10 | |
| 11 | // test_error=access of union field 'float' while field 'int' is active |