parser: minor optimization in call_expr() (#10809)
parent
ddaac5af92
commit
aca66d503d
|
@ -43,7 +43,7 @@ pub fn (mut p Parser) call_expr(language ast.Language, mod string) ast.CallExpr
|
||||||
// In case of `foo<T>()`
|
// In case of `foo<T>()`
|
||||||
// T is unwrapped and registered in the checker.
|
// T is unwrapped and registered in the checker.
|
||||||
full_generic_fn_name := if fn_name.contains('.') { fn_name } else { p.prepend_mod(fn_name) }
|
full_generic_fn_name := if fn_name.contains('.') { fn_name } else { p.prepend_mod(fn_name) }
|
||||||
has_generic := concrete_types.filter(it.has_flag(.generic)).len > 0
|
has_generic := concrete_types.any(it.has_flag(.generic))
|
||||||
if !has_generic {
|
if !has_generic {
|
||||||
// will be added in checker
|
// will be added in checker
|
||||||
p.table.register_fn_concrete_types(full_generic_fn_name, concrete_types)
|
p.table.register_fn_concrete_types(full_generic_fn_name, concrete_types)
|
||||||
|
|
Loading…
Reference in New Issue