summaryrefslogtreecommitdiff
path: root/test/definition/bug.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2021-12-02 22:16:18 +0800
committersumneko <sumneko@hotmail.com>2021-12-02 22:16:18 +0800
commitc47baf932309a05673b7931fdf6a1be207fb7bc4 (patch)
tree2869d38a1472045ee9075083d14ca31ae6b35dd1 /test/definition/bug.lua
parentb6da7274e8fa773183146982f8864247bb33a214 (diff)
parentcb2042160865589b5534a6bf0b6c366ae4ab1d99 (diff)
downloadlua-language-server-c47baf932309a05673b7931fdf6a1be207fb7bc4.zip
Merge remote-tracking branch 'origin/master' into multi-workspace
Diffstat (limited to 'test/definition/bug.lua')
-rw-r--r--test/definition/bug.lua77
1 files changed, 77 insertions, 0 deletions
diff --git a/test/definition/bug.lua b/test/definition/bug.lua
index e8733636..4a755170 100644
--- a/test/definition/bug.lua
+++ b/test/definition/bug.lua
@@ -253,3 +253,80 @@ local <!v!> = t[a]
t[a] = <?v?>
]]
+
+TEST [[
+---@class A
+---@field x number
+
+---@class B: A
+---@field <!x!> boolean
+
+---@type B
+local t
+
+local <!<?v?>!> = t.x
+]]
+
+TEST [[
+---@class A
+---@field <!x!> number
+
+---@class B: A
+
+---@type B
+local t
+
+local <!<?v?>!> = t.x
+]]
+
+TEST [[
+---@class A
+local A
+
+function A:x() end
+
+---@class B: A
+local B
+
+function B:<!x!>() end
+
+---@type B
+local t
+
+local <!<?v?>!> = t.x
+]]
+
+TEST [[
+---@class A
+local A
+
+function A:<!x!>() end
+
+---@class B: A
+local B
+
+---@type B
+local t
+
+local <!<?v?>!> = t.x
+]]
+
+-- TODO
+--TEST [[
+-----@class A
+--local A
+--
+-----@return A
+--function A:x() end
+--
+-----@class B: A
+--local <!B!>
+--
+-----@return B
+--function B:x() end
+--
+-----@type B
+--local t
+--
+--local <!<?v?>!> = t.x()
+--]]