Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 16, 2025
1 parent 87e8a9c commit fe470df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vlib/v/gen/c/cgen.v
Original file line number Diff line number Diff line change
Expand Up @@ -5105,8 +5105,12 @@ fn (mut g Gen) ident(node ast.Ident) {
}
}
}
if node.obj.ct_type_var != .smartcast && node.obj.is_unwrapped {
dot := if obj_sym.is_heap() { '->' } else { '.' }
if i == 0 && node.obj.ct_type_var != .smartcast && node.obj.is_unwrapped {
dot := if !node.obj.orig_type.is_ptr() && obj_sym.is_heap() {
'->'
} else {
'.'
}
g.write('${dot}data')
}
g.write(')')
Expand Down

0 comments on commit fe470df

Please sign in to comment.