summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/not-yieldable.lua
diff options
context:
space:
mode:
authorCppCXY <812125110@qq.com>2022-08-11 19:36:36 +0800
committerCppCXY <812125110@qq.com>2022-08-11 19:36:36 +0800
commitff9103ae4001d8e520171b99cd192997fc689bc9 (patch)
tree04c0b685e81aac48210604dc12d24b91862a36d9 /script/core/diagnostics/not-yieldable.lua
parent40f191a85ea21bb64c427f9dab4bc597e2a0ea1b (diff)
parent82bcfef9037c26681993c94b2f92b68d335de3c6 (diff)
downloadlua-language-server-ff9103ae4001d8e520171b99cd192997fc689bc9.zip
Merge branch 'master' of github.com:CppCXY/lua-language-server
Diffstat (limited to 'script/core/diagnostics/not-yieldable.lua')
-rw-r--r--script/core/diagnostics/not-yieldable.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/core/diagnostics/not-yieldable.lua b/script/core/diagnostics/not-yieldable.lua
index a1c84276..055025d4 100644
--- a/script/core/diagnostics/not-yieldable.lua
+++ b/script/core/diagnostics/not-yieldable.lua
@@ -11,7 +11,7 @@ local function isYieldAble(defs, i)
local arg = def.args and def.args[i]
if arg then
hasFuncDef = true
- if vm.getInfer(arg):hasType 'any'
+ if vm.getInfer(arg):hasType(guide.getUri(def), 'any')
or vm.isAsync(arg, true)
or arg.type == '...' then
return true
@@ -22,7 +22,7 @@ local function isYieldAble(defs, i)
local arg = def.args and def.args[i]
if arg then
hasFuncDef = true
- if vm.getInfer(arg.extends):hasType 'any'
+ if vm.getInfer(arg.extends):hasType(guide.getUri(def), 'any')
or vm.isAsync(arg.extends, true) then
return true
end