summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2024-04-18 14:42:02 +0800
committer最萌小汐 <sumneko@hotmail.com>2024-04-18 14:42:02 +0800
commit1b3a03e310e2751edbd49709a2bba1e34caeb9f2 (patch)
tree95ff5ac0f301700f7ef555c62353a0af78b20283 /test/diagnostics
parent720c39887a8804ffb8b593a7303664407a9e9cbb (diff)
downloadlua-language-server-1b3a03e310e2751edbd49709a2bba1e34caeb9f2.zip
支持多个enum合并
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/param-type-mismatch.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/diagnostics/param-type-mismatch.lua b/test/diagnostics/param-type-mismatch.lua
index e31e9933..b11068db 100644
--- a/test/diagnostics/param-type-mismatch.lua
+++ b/test/diagnostics/param-type-mismatch.lua
@@ -246,3 +246,21 @@ local MyClass = {}
local w = MyClass(<!1!>)
]]
+
+TEST [[
+---@enum(key) A
+local t1 = {
+ x = 1,
+}
+
+---@enum(key) A
+local t2 = {
+ y = 1,
+}
+
+---@param v A
+local function f(v) end
+
+f 'x'
+f 'y'
+]]