summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-23 17:46:30 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-23 17:46:30 +0800
commit54876cb601466c409eb0be1af489c7ceca7f22cf (patch)
tree5f163db31216d283347246c04b6fe469dd4c7d76 /test
parentea72b346a69e29110482e55044b8dcf02c378863 (diff)
downloadlua-language-server-54876cb601466c409eb0be1af489c7ceca7f22cf.zip
close #415 new diagnostic: `duplicate-set-field`
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/init.lua30
1 files changed, 28 insertions, 2 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua
index 8d204daa..00752c42 100644
--- a/test/diagnostics/init.lua
+++ b/test/diagnostics/init.lua
@@ -646,8 +646,8 @@ x = (x + y) or 0
TEST [[
local t = {}
-t.a = 1
-t.a = 2
+<!t.a!> = 1
+<!t.a!> = 2
return t
]]
@@ -1005,3 +1005,29 @@ TEST [[
return function (a)
end
]]
+
+TEST [[
+local m = {}
+
+function <!m:fff!>()
+end
+
+function <!m:fff!>()
+end
+
+return m
+]]
+
+TEST [[
+local m = {}
+
+function m:fff()
+end
+
+do
+ function m:fff()
+ end
+end
+
+return m
+]]