summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua29
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)
+]]