File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -2276,12 +2276,20 @@ pub fn (mut c Checker) fn_call(mut call_expr ast.CallExpr) ast.Type {
2276
2276
if ! found {
2277
2277
if v := call_expr.scope.find_var (fn_name) {
2278
2278
if v.typ != 0 {
2279
- vts := c.table.get_type_symbol (c. unwrap_generic ( v.typ) )
2280
- if vts .kind == .function {
2281
- info := vts .info as ast.FnType
2279
+ generic_vts := c.table.get_type_symbol (v.typ)
2280
+ if generic_vts .kind == .function {
2281
+ info := generic_vts .info as ast.FnType
2282
2282
func = info.func
2283
2283
found = true
2284
2284
found_in_args = true
2285
+ } else {
2286
+ vts := c.table.get_type_symbol (c.unwrap_generic (v.typ))
2287
+ if vts.kind == .function {
2288
+ info := vts.info as ast.FnType
2289
+ func = info.func
2290
+ found = true
2291
+ found_in_args = true
2292
+ }
2285
2293
}
2286
2294
}
2287
2295
}
You can’t perform that action at this time.
0 commit comments