summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-09 15:50:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-09 15:50:48 +0800
commit3827d18e5b84d5372334ee8151362f935edf8ac4 (patch)
tree9a22b30307942181598132be6131c957d50ddb39 /test/type_inference
parent037309aa78dfdb73dce73bec767260967b622216 (diff)
downloadlua-language-server-3827d18e5b84d5372334ee8151362f935edf8ac4.zip
#1148 view `table` after erasing alias
Diffstat (limited to 'test/type_inference')
-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 5f54cebf..41421ea9 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -2349,3 +2349,24 @@ TEST 'number' [[
for <?x?> in _ do
end
]]
+
+TEST 'table' [[
+---@alias tp table
+
+---@type tp
+local <?x?>
+]]
+
+TEST 'table' [[
+---@alias tp {name: boolean}
+
+---@type tp
+local <?x?>
+]]
+
+TEST 'boolean|table' [[
+---@alias tp boolean | {name: boolean}
+
+---@type tp
+local <?x?>
+]]