cgen: minor cleanup in ref_or_deref_arg() (#13874)

pull/13884/head
yuyi 2022-03-31 02:06:38 +08:00 committed by GitHub
parent d40a502981
commit ae1cb5697e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1748,8 +1748,8 @@ fn (mut g Gen) ref_or_deref_arg(arg ast.CallArg, expected_type ast.Type, lang as
expected_type
}
deref_sym := g.table.sym(expected_deref_type)
if !((arg_typ_sym.kind == .function)
|| deref_sym.kind in [.sum_type, .interface_]) && lang != .c {
if arg_typ_sym.kind != .function && deref_sym.kind !in [.sum_type, .interface_]
&& lang != .c {
if arg.expr.is_lvalue() {
g.write('(voidptr)&/*qq*/')
} else {