mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
fix
This commit is contained in:
parent
b5eab19213
commit
95f0d99146
1 changed files with 3 additions and 4 deletions
|
@ -160,11 +160,10 @@ fn (mut g Gen) comptime_call(mut node ast.ComptimeCall) {
|
|||
arg := node.args.last()
|
||||
param := m.params[node.args.len]
|
||||
sym_arg := g.table.final_sym(arg.typ)
|
||||
mut is_arr_interface := sym_arg.info is ast.Array
|
||||
&& g.table.final_sym(sym_arg.info.elem_type).kind == .interface
|
||||
|
||||
arg.expr in [ast.IndexExpr, ast.Ident]
|
||||
&& (g.table.type_to_str(arg.typ) == '[]string' || is_arr_interface)
|
||||
arg.expr in [ast.IndexExpr, ast.Ident] && (g.table.type_to_str(arg.typ) == '[]string'
|
||||
|| sym_arg.info is ast.Array
|
||||
&& g.table.final_sym(sym_arg.info.elem_type).kind == .interface)
|
||||
&& g.table.type_to_str(param.typ) != '[]string'
|
||||
} else {
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue