summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-10-23 19:13:58 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-10-23 19:13:58 +0800
commit2873ccae1dfb1d429a84262f10c87f1d437135c6 (patch)
tree3a444805d35e7a634a8e0a026b07bbb96caa3660 /test
parent96b320247788163f7d014404b7b1f089aed82dff (diff)
downloadlua-language-server-2873ccae1dfb1d429a84262f10c87f1d437135c6.zip
infer parameter type by return
resolve #1202
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index de42a91d..33704c1a 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3858,3 +3858,11 @@ local cb
local <?arr?> = x(cb)
]]
+
+TEST 'integer' [[
+---@return fun(x: integer)
+local function f()
+ return function (<?x?>)
+ end
+end
+]]