Sema: implement calling a fn ptr via a union field

Also, ignore `packed` on unions because that will be removed from the
language.
This commit is contained in:
Andrew Kelley
2021-12-28 20:48:21 -07:00
parent 2dd7255713
commit 91619cdf57
4 changed files with 48 additions and 57 deletions

View File

@@ -1104,9 +1104,6 @@ pub const Union = struct {
pub fn getLayout(u: Union, target: Target, have_tag: bool) Layout {
assert(u.status == .have_layout);
const is_packed = u.layout == .Packed;
if (is_packed) @panic("TODO packed unions");
var most_aligned_field: usize = undefined;
var most_aligned_field_size: u64 = undefined;
var biggest_field: usize = undefined;