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 committed 2021-12-28 23:22:09 -07:00
1 parent 2dd7255713
commit 91619cdf57
4 files changed
+48 -57

No files matched your search

-3
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;