diff options
Diffstat (limited to 'test-beta')
-rw-r--r-- | test-beta/definition/luadoc.lua | 6 | ||||
-rw-r--r-- | test-beta/hover/init.lua | 26 |
2 files changed, 32 insertions, 0 deletions
diff --git a/test-beta/definition/luadoc.lua b/test-beta/definition/luadoc.lua index 675495ef..41331c48 100644 --- a/test-beta/definition/luadoc.lua +++ b/test-beta/definition/luadoc.lua @@ -121,6 +121,12 @@ local mt = {} mt.<?name?> ]] +TEST [[ +---@alias <!A!> string + +---@type <?A?> +]] + -- TODO do return end TEST [[ diff --git a/test-beta/hover/init.lua b/test-beta/hover/init.lua index 43a81fa3..420e4c1d 100644 --- a/test-beta/hover/init.lua +++ b/test-beta/hover/init.lua @@ -1257,3 +1257,29 @@ local t: Class { z: string, } ]] + +TEST [[ +---@class A + +---@type <?A?> +]] +[[ +class A +]] + +TEST [[ +---@type string | "'enum1'" | "'enum2'" +local <?t?> +]] +[[ +local t: string|'enum1'|'enum2' +]] + +TEST [[ +---@alias A string | "'enum1'" | "'enum2'" + +---@type <?A?> +]] +[[ +展开为 string|'enum1'|'enum2' +]] |