summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-28 21:31:16 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-28 21:31:16 +0800
commit29458b6a44674ad2b4b28cb6f81b5d6b0f4a4875 (patch)
treecc986c32e90ec4bca449e60b68f0311492032c6a /test
parentcb906398cbdfb9809811d5322440b6e57b0f8bc0 (diff)
downloadlua-language-server-29458b6a44674ad2b4b28cb6f81b5d6b0f4a4875.zip
#587
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index a4dbf249..5d052f7f 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -878,3 +878,14 @@ local f
f = function (<?x?>) end
]]
+
+TEST 'integer' [[
+--- @class Emit
+--- @field on fun(eventName: string, cb: function)
+--- @field on fun(eventName: '"died"', cb: fun(i: integer))
+--- @field on fun(eventName: '"won"', cb: fun(s: string))
+local emit = {}
+
+emit:on("died", function (<?i?>)
+end)
+]]