summaryrefslogtreecommitdiff
path: root/test/definition/bug.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-12-02 17:40:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-12-02 17:40:15 +0800
commit9f236d0485ac4cee2b62261b84ef93f473596495 (patch)
tree8e0ffdafd335042c6dc9f6f6ba30ffd616b654f2 /test/definition/bug.lua
parentb48f0819008eb50320660f34f316f1b9bde4eb59 (diff)
downloadlua-language-server-9f236d0485ac4cee2b62261b84ef93f473596495.zip
#832
Diffstat (limited to 'test/definition/bug.lua')
-rw-r--r--test/definition/bug.lua57
1 files changed, 57 insertions, 0 deletions
diff --git a/test/definition/bug.lua b/test/definition/bug.lua
index 7a2cc789..9ea47fd1 100644
--- a/test/definition/bug.lua
+++ b/test/definition/bug.lua
@@ -253,3 +253,60 @@ 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
+]]