diff options
Diffstat (limited to 'test/diagnostics/init.lua')
-rw-r--r-- | test/diagnostics/init.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index 5502093e..6374b4b7 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -1049,3 +1049,16 @@ m.x = nil return m ]] + +TEST [[ +---@class A +---@field a boolean + +---@return A +local function f() end + +local r = f() +r.x = 1 + +return r.x +]] |