summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-06 23:49:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-06 23:49:28 +0800
commita19a1f4f077830014dd2d2c378988e7770be2be1 (patch)
tree137f0455d0648c425b96004a236c074f30ad1340 /test
parent79cc877095745be377b9dd189ee5e38cf35a3c5e (diff)
downloadlua-language-server-a19a1f4f077830014dd2d2c378988e7770be2be1.zip
support `call`
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 619d7615..065109aa 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3555,3 +3555,24 @@ TEST 'boolean' [[
local a
local <?b?> = a + true
]]
+
+TEST 'A' [[
+---@class A
+---@operator call: A
+
+---@type A
+local a
+local <?b?> = a()
+]]
+
+TEST 'A' [[
+---@class A
+---@operator call: A
+
+---@type A
+local a
+
+local t = {
+ <?x?> = a(),
+}
+]]