We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a65a4f commit 393d5b9Copy full SHA for 393d5b9
vlib/v/checker/checker.v
@@ -391,7 +391,11 @@ pub fn (mut c Checker) check_files(ast_files []&ast.File) {
391
}
392
393
c.timers.start('checker_post_process_generic_fns')
394
- last_file := c.file
+ mut last_file := c.file
395
+ // c.file might be nil in vls mode, fall back to first file
396
+ if c.pref.is_vls && last_file == unsafe { nil } && ast_files.len > 0 {
397
+ last_file = ast_files[0]
398
+ }
399
// post process generic functions. must be done after all files have been
400
// checked, to ensure all generic calls are processed, as this information
401
// is needed when the generic type is auto inferred from the call argument.
0 commit comments