| ... | @@ -150,3 +150,19 @@ fn testEnumWithSpecifiedAndUnspecifiedTagValues(x: &const MultipleChoice2) { | ... | @@ -150,3 +150,19 @@ fn testEnumWithSpecifiedAndUnspecifiedTagValues(x: &const MultipleChoice2) { |
| 150 | }); | 150 | }); |
| 151 | } | 151 | } |
| 152 | | 152 | |
| | 153 | |
| | 154 | const ExternPtrOrInt = extern union { |
| | 155 | ptr: &u8, |
| | 156 | int: u64 |
| | 157 | }; |
| | 158 | test "extern union size" { |
| | 159 | comptime assert(@sizeOf(ExternPtrOrInt) == 8); |
| | 160 | } |
| | 161 | |
| | 162 | const PackedPtrOrInt = packed union { |
| | 163 | ptr: &u8, |
| | 164 | int: u64 |
| | 165 | }; |
| | 166 | test "extern union size" { |
| | 167 | comptime assert(@sizeOf(PackedPtrOrInt) == 8); |
| | 168 | } |