diff options
author | Lei Zhu <uhziel@gmail.com> | 2020-12-29 19:37:21 +0800 |
---|---|---|
committer | Lei Zhu <uhziel@gmail.com> | 2020-12-29 19:37:21 +0800 |
commit | 42f9c7d02d6062ce7216abc1489f7a48761cd574 (patch) | |
tree | 8ff0a4ed5bd557f9804628fbb8ccc277a6982475 /test/definition | |
parent | 248ca2a2ba50f2c059d8ab2d3d5688584e98bf62 (diff) | |
download | lua-language-server-42f9c7d02d6062ce7216abc1489f7a48761cd574.zip |
提交对 doc.type.map 支持的初版,可以处理推导 v1[1].bar1 的情况
Diffstat (limited to 'test/definition')
-rw-r--r-- | test/definition/luadoc.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua index 1f3dae00..469c790d 100644 --- a/test/definition/luadoc.lua +++ b/test/definition/luadoc.lua @@ -253,3 +253,13 @@ function Generic(arg1) print(arg1) end local v1 = Generic("Foo") print(v1.<?bar1?>) ]] + +TEST [[ +---@class Foo +local Foo = {} +function Foo:<!bar1!>() end + +---@type table<number, Foo> +local v1 +print(v1[1].<?bar1?>) +]] |