diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 20:58:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-20 20:58:56 +0800 |
commit | c65de666e0a3706b921993648910ef531c47c607 (patch) | |
tree | 034c07b07b3a4c8109e2f3adb4c6b89b83ae0358 /test/diagnostics | |
parent | a04cffb43132645f63e5a319f6ca69e0df87dcdb (diff) | |
download | lua-language-server-c65de666e0a3706b921993648910ef531c47c607.zip |
update
Diffstat (limited to 'test/diagnostics')
-rw-r--r-- | test/diagnostics/type-check.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/diagnostics/type-check.lua b/test/diagnostics/type-check.lua index 30e727d3..295fb32d 100644 --- a/test/diagnostics/type-check.lua +++ b/test/diagnostics/type-check.lua @@ -212,6 +212,40 @@ local y TEST [[ ---@class A +local m + +m.x = 1 + +---@type A +local t + +<!t.x!> = true +]] + +TEST [[ +---@class A +local m + +---@type integer +m.x = 1 + +<!m.x!> = true +]] + +TEST [[ +---@class A +local mt + +---@type integer +mt.x = 1 + +function mt:init() + <!self.x!> = true +end +]] + +TEST [[ +---@class A ---@field x integer ---@type A |