summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-26 21:28:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-26 21:28:33 +0800
commit32f85a5757c6fca2529e287a58d358da54a422e4 (patch)
tree2291611aed343480e51fde73a84eee6eaaf71736 /test
parenteb0735fd4cb9530dfa6534d7424d08155e4fb619 (diff)
downloadlua-language-server-32f85a5757c6fca2529e287a58d358da54a422e4.zip
fix #1092
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index fa4249d1..817631d2 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -1552,6 +1552,33 @@ local AAA
local <?x?> = AAA()
]]
+TEST 'AA' [[
+---@class AA
+---@overload fun():AA
+AAA = {}
+
+
+local <?x?> = AAA()
+]]
+
+TEST 'AA' [[
+---@overload fun():AA
+AAA.BBB = {}
+
+
+local <?x?> = AAA.BBB()
+]]
+
+TEST 'AA' [[
+local AAA
+
+---@overload fun():AA
+AAA.BBB = {}
+
+
+local <?x?> = AAA.BBB()
+]]
+
TEST 'string|integer' [[
local <?x?>
x = '1'