mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: fix generic os.fn call (script) without mod prefix. fixes #7073
This commit is contained in:
parent
ca7692c839
commit
cd46eb42d7
@ -1433,6 +1433,9 @@ pub fn (mut c Checker) call_fn(mut call_expr ast.CallExpr) table.Type {
|
||||
if c.pref.is_script && !found {
|
||||
os_name := 'os.$fn_name'
|
||||
if f1 := c.table.find_fn(os_name) {
|
||||
if f1.is_generic && call_expr.generic_type != table.void_type {
|
||||
c.table.fn_gen_types[os_name] = c.table.fn_gen_types['${call_expr.mod}.$call_expr.name']
|
||||
}
|
||||
call_expr.name = os_name
|
||||
found = true
|
||||
f = f1
|
||||
|
Loading…
Reference in New Issue
Block a user