diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-10 20:25:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-10 20:25:16 +0800 |
commit | 85cf8a5843e3c2e5c3bd4e17cf32eb1c1ba8a05e (patch) | |
tree | 223772f5f5f50b8430ec1656aa62b89a4d49e170 /script/core/diagnostics/no-implicit-any.lua | |
parent | 840947ef84baa30356bea82c87f81908876fd206 (diff) | |
download | lua-language-server-85cf8a5843e3c2e5c3bd4e17cf32eb1c1ba8a05e.zip |
fix
Diffstat (limited to 'script/core/diagnostics/no-implicit-any.lua')
-rw-r--r-- | script/core/diagnostics/no-implicit-any.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/script/core/diagnostics/no-implicit-any.lua b/script/core/diagnostics/no-implicit-any.lua index 23af570a..ccbb4917 100644 --- a/script/core/diagnostics/no-implicit-any.lua +++ b/script/core/diagnostics/no-implicit-any.lua @@ -1,8 +1,7 @@ local files = require 'files' -local searcher = require 'core.searcher' +local guide = require 'parser.guide' local lang = require 'language' -local define = require 'proto.define' -local vm = require 'vm' +local infer = require 'core.infer' return function (uri, callback) local ast = files.getAst(uri) @@ -10,7 +9,7 @@ return function (uri, callback) return end - searcher.eachSource(ast.ast, function (source) + guide.eachSource(ast.ast, function (source) if source.type ~= 'local' and source.type ~= 'setlocal' and source.type ~= 'setglobal' @@ -21,7 +20,7 @@ return function (uri, callback) and source.type ~= 'tableindex' then return end - if vm.getInferType(source, 0) == 'any' then + if infer.searchAndViewInfers(source) == 'any' then callback { start = source.start, finish = source.finish, |