summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-11-19 16:12:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-11-19 16:12:51 +0800
commit5e3f203d76473e2ade05cfd344f2dc6608d65e1a (patch)
treec7fc3f6cfab0aaeb076f39817a3369aba41bd807 /test/type_inference
parentbb9920e0925aa88ca512e789a72be010404011a0 (diff)
downloadlua-language-server-5e3f203d76473e2ade05cfd344f2dc6608d65e1a.zip
fix #798
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 908d613c..5526d6d8 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -943,3 +943,19 @@ local x
<?x?> = 1
]]
+
+TEST 'any' [[
+---@return number
+local function f(x)
+ local <?y?> = x()
+end
+]]
+
+TEST 'any' [[
+local mt
+
+---@return number
+function mt:f() end
+
+local <?v?> = mt()
+]]