summaryrefslogtreecommitdiff
path: root/test/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-08 15:49:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-08 15:49:18 +0800
commite5f5d4251beaf882f6b125ce7552127b9ea21240 (patch)
treed58956ddf8b9661fbbbb1ebcc70efdf6b9fdb8f3 /test/hover
parent5fd1d62add115ba4a77236e927f87359e4f37018 (diff)
downloadlua-language-server-e5f5d4251beaf882f6b125ce7552127b9ea21240.zip
fix duplicate fields in table hover
Diffstat (limited to 'test/hover')
-rw-r--r--test/hover/init.lua17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua
index 4ce2de8c..751299bb 100644
--- a/test/hover/init.lua
+++ b/test/hover/init.lua
@@ -1714,7 +1714,7 @@ local <?t?> = {
local t: {
x: string = "e",
y: string = "f",
- ["z"]: string = "g",
+ ['z']: string = "g",
[10]: string = "d",
[1]: string = "a",
[2]: string = "b",
@@ -2415,3 +2415,18 @@ local t: { [string]: string }[] {
foo: unknown,
}
]]
+
+TEST [[
+local t = {
+ ['x'] = 1,
+ ['y'] = 2,
+}
+
+print(t.x, <?t?>.y)
+]]
+[[
+local t: {
+ ['x']: integer = 1,
+ ['y']: integer = 2,
+}
+]]