mirror of
https://github.com/vlang/v.git
synced 2025-09-15 02:18:47 -04:00
cgen: cleanup, use expected_is_ptr
instead of calling .is_ptr() again (#19836)
This commit is contained in:
parent
999328a136
commit
bcc2bfad15
@ -2537,7 +2537,7 @@ fn (mut g Gen) expr_with_cast(expr ast.Expr, got_type_raw ast.Type, expected_typ
|
||||
g.writeln('}, sizeof(${shared_styp}))')
|
||||
return
|
||||
} else if got_type_raw.has_flag(.shared_f) && !expected_type.has_flag(.shared_f) {
|
||||
if expected_type.is_ptr() {
|
||||
if expected_is_ptr {
|
||||
g.write('&')
|
||||
}
|
||||
g.expr(expr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user