Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Dec 25, 2024
1 parent 032f17a commit 020c8ef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vlib/v/gen/c/cgen.v
Original file line number Diff line number Diff line change
Expand Up @@ -7107,10 +7107,8 @@ fn (mut g Gen) type_default_sumtype(typ_ ast.Type, sym ast.TypeSymbol) string {
'(${first_styp}){.state=2, .err=_const_none__, .data={EMPTY_STRUCT_INITIALIZATION}}'
} else if first_sym.info is ast.Struct && first_sym.info.is_empty_struct() {
'{EMPTY_STRUCT_INITIALIZATION}'
} else if first_sym.kind == .struct {
'{0}'
} else {
g.type_default(first_typ)
g.type_default_no_sumtype(first_typ)
}
if default_str[0] == `{` {
return '(${g.styp(typ_)}){._${first_field}=HEAP(${first_styp}, ((${first_styp})${default_str})),._typ=${int(first_typ)}}'
Expand Down

0 comments on commit 020c8ef

Please sign in to comment.