summaryrefslogtreecommitdiff
path: root/test/definition
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-06 22:58:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-06 22:58:11 +0800
commit9be846d86c494e08d376aa465e8269796176765a (patch)
tree04027cdb5ae6a118739a92911dbbd6797a39939f /test/definition
parentdcca81c4fa7bd9b745123be8be0c8b07fcd6e29a (diff)
downloadlua-language-server-9be846d86c494e08d376aa465e8269796176765a.zip
type check: check the fields in table
resolve #1434
Diffstat (limited to 'test/definition')
-rw-r--r--test/definition/luadoc.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua
index d8da938e..d8b3ef60 100644
--- a/test/definition/luadoc.lua
+++ b/test/definition/luadoc.lua
@@ -642,7 +642,7 @@ end
]]
TEST [[
----@class TT<V>: { <!x: V!> }
+---@class TT<V>: { <!x!>: V }
---@type TT<A>
local t
@@ -653,7 +653,7 @@ print(t.<?x?>)
]]
TEST [[
----@alias TT<V> { <!x: V!> }
+---@alias TT<V> { <!x!>: V }
---@type TT<A>
local t
@@ -823,7 +823,7 @@ z.<?a?>
]]
TEST [[
----@type { <!x: number!>, y: number }
+---@type { <!x!>: number, y: number }
local t
print(t.<?x?>)
@@ -846,14 +846,14 @@ local <!<?v?>!> = t[1]
TEST [[
---@class A
----@field <!['xx']!>? <!{}!>
+---@field [<!'xx'!>]? <!{}!>
local t
print(t.<?xx?>)
]]
TEST [[
----@type { <!['xx']?: boolean!> }
+---@type { [<!'xx'!>]?: boolean }
local t
print(t.<?xx?>)