diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-05-12 20:58:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-05-12 20:58:33 +0800 |
commit | 49b0244734a579036c1d3f318ce435a94974c038 (patch) | |
tree | 936e78c91cc824cb6fc00e4b694f96dcd13295db /test | |
parent | 813da76cc7f899d7a0eca5afb0f224cd64eaaab0 (diff) | |
download | lua-language-server-49b0244734a579036c1d3f318ce435a94974c038.zip |
resolve pcall
Diffstat (limited to 'test')
-rw-r--r-- | test/definition/luadoc.lua | 2 | ||||
-rw-r--r-- | test/type_inference/init.lua | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua index 14f24552..d0d95847 100644 --- a/test/definition/luadoc.lua +++ b/test/definition/luadoc.lua @@ -113,7 +113,7 @@ print(<?f?>) TEST [[ local function f() - return 1 + return <!1!> end ---@class Class diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 0a041433..9a6cce6f 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -171,6 +171,11 @@ string.sub = function () end ]] TEST 'function' [[ +---@class stringlib +local string + +string.sub = function () end + _VERSION = 'Lua 5.4' <?x?> = _VERSION.sub @@ -217,8 +222,11 @@ end _, <?y?> = pcall(x) ]] -TEST 'oslib' [[ -local <?os?> = require 'os' +TEST 'integer' [[ +local function x() + return 1 +end +_, <?y?> = xpcall(x) ]] TEST 'string|table' [[ |