summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/diagnostic.lua11
-rw-r--r--test/diagnostics/common.lua6
2 files changed, 14 insertions, 3 deletions
diff --git a/test/crossfile/diagnostic.lua b/test/crossfile/diagnostic.lua
index e574204a..58c89805 100644
--- a/test/crossfile/diagnostic.lua
+++ b/test/crossfile/diagnostic.lua
@@ -165,3 +165,14 @@ TEST {
print(obj.<!x!>)
]]}
}
+
+TEST {
+ { path = 'a.lua', content = [[
+ ---@class A
+ ---@field <!x!> number
+ ]]},
+ { path = 'b.lua', content = [[
+ ---@class A
+ ---@field <!x!> number
+ ]]}
+}
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua
index 760f1f6f..5e0b3d2a 100644
--- a/test/diagnostics/common.lua
+++ b/test/diagnostics/common.lua
@@ -895,7 +895,7 @@ TEST [[
TEST [[
---@class Class
----@field x Class
+---@field <!x!> Class
---@field <!x!> Class
]]
@@ -1275,7 +1275,7 @@ local emit = {}
TEST [[
--- @class Emit
--- @field on fun(eventName: string, cb: function)
---- @field on fun(eventName: '"died"', cb: fun(i: integer))
+--- @field <!on!> fun(eventName: '"died"', cb: fun(i: integer))
--- @field on fun(eventName: '"won"', cb: fun(s: string))
--- @field <!on!> fun(eventName: '"died"', cb: fun(i: integer))
local emit = {}
@@ -1738,7 +1738,7 @@ TEST [[
---@class A
---@class B
----@field [A] A
+---@field [<!A!>] A
---@field [<!A!>] true
]]