1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: minor cleanup in fn_var_signature() (#15454)

This commit is contained in:
yuyi 2022-08-17 23:42:46 +08:00 committed by GitHub
parent 7ed3389fa8
commit d3307fd2e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,12 +69,12 @@ fn (mut g Gen) fn_var_signature(return_type ast.Type, params []ast.Param, var_na
for j, arg in params {
arg_sym := g.table.sym(arg.typ)
if arg_sym.info is ast.FnType {
arg_sig := g.fn_var_signature(arg_sym.info.func.return_type, arg_sym.info.func.params,
'')
func := arg_sym.info.func
arg_sig := g.fn_var_signature(func.return_type, func.params, '')
sig += arg_sig
} else {
arg_styp := g.typ(arg.typ)
sig += '$arg_styp'
sig += arg_styp
}
if j < params.len - 1 {
sig += ', '