Skip to content

Commit bcc2bfa

Browse files
authored
cgen: cleanup, use expected_is_ptr instead of calling .is_ptr() again (#19836)
1 parent 999328a commit bcc2bfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vlib/v/gen/c/cgen.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2537,7 +2537,7 @@ fn (mut g Gen) expr_with_cast(expr ast.Expr, got_type_raw ast.Type, expected_typ
25372537
g.writeln('}, sizeof(${shared_styp}))')
25382538
return
25392539
} else if got_type_raw.has_flag(.shared_f) && !expected_type.has_flag(.shared_f) {
2540-
if expected_type.is_ptr() {
2540+
if expected_is_ptr {
25412541
g.write('&')
25422542
}
25432543
g.expr(expr)

0 commit comments

Comments
 (0)