mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
parent
7b8c9fb715
commit
7568526b14
1 changed files with 8 additions and 1 deletions
|
@ -3991,7 +3991,14 @@ fn (mut c Checker) at_expr(mut node ast.AtExpr) ast.Type {
|
|||
}
|
||||
|
||||
fn (mut c Checker) resolve_var_fn(func &ast.Fn, mut node ast.Ident, name string) ast.Type {
|
||||
mut fn_type := ast.new_type(c.table.find_or_register_fn_type(func, false, true))
|
||||
mut fn_type := c.table.find_or_register_fn_type(func, false, true)
|
||||
if fn_type < 0 {
|
||||
mut f := ast.Fn{
|
||||
...func
|
||||
}
|
||||
f.name = ''
|
||||
fn_type = c.table.find_or_register_fn_type(f, false, true)
|
||||
}
|
||||
if func.generic_names.len > 0 {
|
||||
concrete_types := node.concrete_types.map(c.unwrap_generic(it))
|
||||
if typ_ := c.table.convert_generic_type(fn_type, func.generic_names, concrete_types) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue