summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-05 01:25:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-05 01:25:21 +0800
commitb870bc090ce17747de961a713fc6333d2e6d401f (patch)
tree7c7ee13ecb233e62649a5ff982b7531a0c071e65 /test/type_inference
parent82ccd9baf64bf739e0bf7f8251075acb9e286356 (diff)
downloadlua-language-server-b870bc090ce17747de961a713fc6333d2e6d401f.zip
infer parameter type by function type
#1457
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 9af0d28c..36bbaa83 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3931,3 +3931,8 @@ local t = {
[5] = function(<?x?>) end,
}
]]
+
+TEST 'number' [[
+---@type fun(x: number)
+local function f(<?x?>) end
+]]