summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-05 21:15:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-05 21:15:08 +0800
commit48c53a36c6bad6662aabc8af98fb58d54ad9a498 (patch)
treefc2cfcfdfbb761f810d43030b3f948cae86f00c7 /test
parent55166a406c56de8fe9f6932fabf9ca1c3cca469a (diff)
downloadlua-language-server-48c53a36c6bad6662aabc8af98fb58d54ad9a498.zip
resolve #1065 show detail for `doc.type.table`
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 94ee5638..8e9e134f 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -520,7 +520,7 @@ TEST 'fun(a: string, b: any, c?: boolean, ...any):c, d?, ...unknown' [[
local <?x?>
]]
-TEST 'table' [[
+TEST '{ [string]: string }' [[
---@type { [string]: string }
local <?x?>
]]
@@ -2439,14 +2439,14 @@ TEST 'table' [[
local <?x?>
]]
-TEST 'table' [[
+TEST '{ name: boolean }' [[
---@alias tp {name: boolean}
---@type tp
local <?x?>
]]
-TEST 'boolean|table' [[
+TEST 'boolean|{ name: boolean }' [[
---@alias tp boolean | {name: boolean}
---@type tp
@@ -3376,3 +3376,8 @@ TEST 'A' [[
---@diagnostic disable
local <?t?>
]]
+
+TEST '{ [string]: number, [true]: string, [1]: boolean, tag: integer }' [[
+---@type {[string]: number, [true]: string, [1]: boolean, tag: integer}
+local <?t?>
+]]