diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-10 20:45:07 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-10 20:45:07 +0800 |
commit | ccae29c7a288aa200fdab3b2ec4bd2688786d601 (patch) | |
tree | b83057d95f79c343c571abd24468adabc85dd05d /server | |
parent | 81da8135d6aa45ab0d02534b93e019222afbe51b (diff) | |
download | lua-language-server-ccae29c7a288aa200fdab3b2ec4bd2688786d601.zip |
非字面量只能获得0.9的推断度
Diffstat (limited to 'server')
-rw-r--r-- | server/main.lua | 2 | ||||
-rw-r--r-- | server/src/vm/vm.lua | 4 |
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 |