summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-17 16:57:36 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-17 16:57:36 +0800
commit505f8de67ce7759e6321017abbd69f1d4799e8b1 (patch)
tree381159859043ef9bc6b05dda9a5e0749ba0bb8b7 /test
parent6c89b0a55de7e47c9300b4f42421d8f45433da4c (diff)
downloadlua-language-server-505f8de67ce7759e6321017abbd69f1d4799e8b1.zip
don't check `duplicate-set-field` in different if
Diffstat (limited to 'test')
-rw-r--r--test/diagnostics/common.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index b91380b8..89537771 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -2231,3 +2231,34 @@ mt.init = function ()
obj.x = 1
end
]]
+
+TEST [[
+---@class A
+X = {}
+
+function <!X.f!>() end
+
+function <!X.f!>() end
+]]
+
+TEST [[
+---@meta
+
+---@class A
+X = {}
+
+function X.f() end
+
+function X.f() end
+]]
+
+TEST [[
+---@class A
+X = {}
+
+if true then
+ function X.f() end
+else
+ function X.f() end
+end
+]]