summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-10 20:45:07 +0800
committersumneko <sumneko@hotmail.com>2019-04-10 20:45:07 +0800
commitccae29c7a288aa200fdab3b2ec4bd2688786d601 (patch)
treeb83057d95f79c343c571abd24468adabc85dd05d /server/src
parent81da8135d6aa45ab0d02534b93e019222afbe51b (diff)
downloadlua-language-server-ccae29c7a288aa200fdab3b2ec4bd2688786d601.zip
非字面量只能获得0.9的推断度
Diffstat (limited to 'server/src')
-rw-r--r--server/src/vm/vm.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua
index 5091a1bc..5b686bd5 100644
--- a/server/src/vm/vm.lua
+++ b/server/src/vm/vm.lua
@@ -247,7 +247,7 @@ function mt:callLibrary(func, values, source, lib)
for i, arg in ipairs(lib.args) do
local value = values[i]
if value and arg.type ~= '...' then
- value:setType(arg.type, 1.0)
+ value:setType(arg.type, 0.9)
end
end
end
@@ -261,7 +261,7 @@ function mt:callLibrary(func, values, source, lib)
end
local value = func:getReturn(i)
if value then
- value:setType(rtn.type or 'any', 1.0)
+ value:setType(rtn.type or 'any', 0.9)
end
end
end