| ... | ... | @@ -3835,7 +3835,7 @@ fn unionDeclInner( |
| 3835 | 3835 | if (member.comptime_token) |comptime_token| { |
| 3836 | 3836 | return astgen.failTok(comptime_token, "union fields cannot be marked comptime", .{}); |
| 3837 | 3837 | } |
| 3838 | | try fields_data.ensureUnusedCapacity(gpa, 4); |
| 3838 | try fields_data.ensureUnusedCapacity(gpa, if (node_tags[member.ast.type_expr] != .@"anytype") 4 else 3); |
| 3839 | 3839 | |
| 3840 | 3840 | const field_name = try astgen.identAsString(member.ast.name_token); |
| 3841 | 3841 | fields_data.appendAssumeCapacity(field_name); |
| ... | ... | @@ -3850,7 +3850,7 @@ fn unionDeclInner( |
| 3850 | 3850 | (@as(u32, @boolToInt(have_value)) << 30) | |
| 3851 | 3851 | (@as(u32, @boolToInt(unused)) << 31); |
| 3852 | 3852 | |
| 3853 | | if (have_type) { |
| 3853 | if (have_type and node_tags[member.ast.type_expr] != .@"anytype") { |
| 3854 | 3854 | const field_type = try typeExpr(&block_scope, &block_scope.base, member.ast.type_expr); |
| 3855 | 3855 | fields_data.appendAssumeCapacity(@enumToInt(field_type)); |
| 3856 | 3856 | } |