workaround msvc test bug right now, should fix in anther PR

This commit is contained in:
kbkpbot 2025-09-12 19:29:43 +08:00
parent f1a3320ba3
commit 513030dd6b

View file

@ -7604,7 +7604,7 @@ fn (mut g Gen) type_default_impl(typ_ ast.Type, decode_sumtype bool) string {
field_sym := g.table.sym(field.typ) field_sym := g.table.sym(field.typ)
is_option := field.typ.has_flag(.option) is_option := field.typ.has_flag(.option)
if is_option || field.has_default_expr if is_option || field.has_default_expr
|| field_sym.kind in [.enum, .array_fixed, .array, .map, .string, .bool, .alias, .i8, .i16, .i32, .int, .i64, .u8, .u16, .u32, .u64, .f32, .f64, .char, .voidptr, .byteptr, .charptr, .struct, .chan, .sum_type] { || field_sym.kind in [.enum, .array_fixed, .array, .map, .string, .bool, .alias, .i8, .i16, .int, .i64, .u8, .u16, .u32, .u64, .f32, .f64, .char, .voidptr, .byteptr, .charptr, .struct, .chan, .sum_type] {
if sym.language == .c && !field.has_default_expr && !is_option { if sym.language == .c && !field.has_default_expr && !is_option {
continue continue
} }