diff options
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' [[ |