summaryrefslogtreecommitdiff
path: root/test/diagnostics/duplicate-index.lua
diff options
context:
space:
mode:
authorfesily <fesil@foxmail.com>2024-01-10 11:03:21 +0800
committerGitHub <noreply@github.com>2024-01-10 11:03:21 +0800
commit1e7bb72ad3ff2b75a1c55ee4bc53004cb7fe30f7 (patch)
treedd94cf09b9e3a675a73a9f1d41248d1538165997 /test/diagnostics/duplicate-index.lua
parentbb6e172d6166190bd4edd3bb56230a7d60ebcb93 (diff)
parent37779f9b2493e51e59e1e4366bf7dcb8350e69bd (diff)
downloadlua-language-server-1e7bb72ad3ff2b75a1c55ee4bc53004cb7fe30f7.zip
Merge branch 'LuaLS:master' into plugin-add-OnTransformAst
Diffstat (limited to 'test/diagnostics/duplicate-index.lua')
-rw-r--r--test/diagnostics/duplicate-index.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/diagnostics/duplicate-index.lua b/test/diagnostics/duplicate-index.lua
new file mode 100644
index 00000000..3289c736
--- /dev/null
+++ b/test/diagnostics/duplicate-index.lua
@@ -0,0 +1,24 @@
+TEST [[
+return {
+ <!x!> = 1,
+ y = 2,
+ <!x!> = 3,
+}
+]]
+
+TEST [[
+return {
+ x = 1,
+ y = 2,
+}, {
+ x = 1,
+ y = 2,
+}
+]]
+
+TEST [[
+return {
+ 1, <!2!>, 3,
+ [<!2!>] = 4,
+}
+]]