summaryrefslogtreecommitdiff
path: root/server
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
parent81da8135d6aa45ab0d02534b93e019222afbe51b (diff)
downloadlua-language-server-ccae29c7a288aa200fdab3b2ec4bd2688786d601.zip
非字面量只能获得0.9的推断度
Diffstat (limited to 'server')
-rw-r--r--server/main.lua2
-rw-r--r--server/src/vm/vm.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/server/main.lua b/server/main.lua
index 1895f804..dd0c53d3 100644
--- a/server/main.lua
+++ b/server/main.lua
@@ -21,7 +21,7 @@ local function tryDebugger()
log.info('Debugger startup, listen port: 11411')
end
---pcall(tryDebugger)
+pcall(tryDebugger)
require 'utility'
require 'global_protect'
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