mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: minor cleanup in ref_or_deref_arg() (#13874)
This commit is contained in:
parent
d40a502981
commit
ae1cb5697e
@ -1748,8 +1748,8 @@ fn (mut g Gen) ref_or_deref_arg(arg ast.CallArg, expected_type ast.Type, lang as
|
|||||||
expected_type
|
expected_type
|
||||||
}
|
}
|
||||||
deref_sym := g.table.sym(expected_deref_type)
|
deref_sym := g.table.sym(expected_deref_type)
|
||||||
if !((arg_typ_sym.kind == .function)
|
if arg_typ_sym.kind != .function && deref_sym.kind !in [.sum_type, .interface_]
|
||||||
|| deref_sym.kind in [.sum_type, .interface_]) && lang != .c {
|
&& lang != .c {
|
||||||
if arg.expr.is_lvalue() {
|
if arg.expr.is_lvalue() {
|
||||||
g.write('(voidptr)&/*qq*/')
|
g.write('(voidptr)&/*qq*/')
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user