diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-02 17:20:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-02 17:20:28 +0800 |
commit | 9a25855cee5238a870f366a2f9d096142b72cd5a (patch) | |
tree | f9d6dff6a4aa6d13109c0c9c3f0b77fcf9c98882 /test/type_inference | |
parent | 0ba04868b6bed5c213cb0f7e3d732ce59bf930f0 (diff) | |
download | lua-language-server-9a25855cee5238a870f366a2f9d096142b72cd5a.zip |
reslove #460
Diffstat (limited to 'test/type_inference')
-rw-r--r-- | test/type_inference/init.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 3ec1cf19..3df73863 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -828,6 +828,13 @@ TEST 'fun():number, boolean' [[ local <?t?> ]] +--[[ +l:value +l:work|&1|&1 +f:|&1|&1 +dfun:|&1 +dn:Class +]] TEST 'Class' [[ ---@class Class @@ -838,3 +845,25 @@ end work(function (<?value?>) end) ]] + +TEST 'Class' [[ +---@class Class + +---@param callback fun(value: Class) +function work(callback) +end + +pcall(work, function (<?value?>) +end) +]] + +TEST 'Class' [[ +---@class Class + +---@param callback fun(value: Class) +function work(callback) +end + +xpcall(work, debug.traceback, function (<?value?>) +end) +]] |