summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-10-31 14:30:26 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-10-31 14:30:26 +0800
commit4d65d77f5214bf5dd935956c861580ff2b46bfe4 (patch)
tree05266557abeb44e99ac242f16d13f90ecb86c7a7 /test
parenta498527cd98f683bf61e86430766ddc20e063c49 (diff)
downloadlua-language-server-4d65d77f5214bf5dd935956c861580ff2b46bfe4.zip
add `---@package`
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/diagnostic.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/crossfile/diagnostic.lua b/test/crossfile/diagnostic.lua
index dd06351f..e574204a 100644
--- a/test/crossfile/diagnostic.lua
+++ b/test/crossfile/diagnostic.lua
@@ -140,3 +140,28 @@ TEST {
content = 'require "f.a"',
},
}
+
+TEST {
+ { path = 'a.lua', content = [[
+ ---@class A
+ ---@field package x string
+
+ ---@type A
+ local obj
+
+ print(obj.x)
+ ]]},
+}
+
+TEST {
+ { path = 'a.lua', content = [[
+ ---@class A
+ ---@field package x string
+ ]]},
+ { path = 'b.lua', content = [[
+ ---@type A
+ local obj
+
+ print(obj.<!x!>)
+ ]]}
+}