diff options
Diffstat (limited to 'test/diagnostics/common.lua')
-rw-r--r-- | test/diagnostics/common.lua | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/test/diagnostics/common.lua b/test/diagnostics/common.lua index f7cbbb0d..0231cc86 100644 --- a/test/diagnostics/common.lua +++ b/test/diagnostics/common.lua @@ -2081,3 +2081,64 @@ end print(1) ]] + +TEST [[ +---@class A +---@field private x number +---@field protected y number +---@field public z number +local t +print(t.x) +]] + +TEST [[ +---@class A +---@field private x number +---@field protected y number +---@field public z number + +---@type A +local t + +print(t.<!x!>) +]] + +TEST [[ +---@class A +---@field private x number +---@field protected y number +---@field public z number + +---@class B: A +local t + +print(t.y) +]] + +TEST [[ +---@class A +---@field private x number +---@field protected y number +---@field public z number + +---@class B: A + +---@type B +local t + +print(t.<!y!>) +]] + +TEST [[ +---@class A +---@field private x number +---@field protected y number +---@field public z number + +---@class B: A + +---@type B +local t + +print(t.z) +]] |