diff options
author | AlexCai2019 <89138532+AlexCai2019@users.noreply.github.com> | 2022-05-08 01:43:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 01:43:28 +0800 |
commit | 0fd83c4ca9f82a02becab6c304a8a7de75098507 (patch) | |
tree | be9790d9d4823fe728c5b36e94093fe5f42b7725 /test/hover/init.lua | |
parent | 89203efad8c9b5513e05ca4d5696107924865b10 (diff) | |
parent | 67b4c574849d1667e0ecb39c51aeed8e30b43056 (diff) | |
download | lua-language-server-0fd83c4ca9f82a02becab6c304a8a7de75098507.zip |
Merge branch 'sumneko:master' into master
Diffstat (limited to 'test/hover/init.lua')
-rw-r--r-- | test/hover/init.lua | 55 |
1 files changed, 36 insertions, 19 deletions
diff --git a/test/hover/init.lua b/test/hover/init.lua index ee66ef2b..dc725f6c 100644 --- a/test/hover/init.lua +++ b/test/hover/init.lua @@ -280,8 +280,8 @@ TEST [[ ]] [=[ function load(chunk: string|function, chunkname?: string, mode?: "b"|"bt"|"t", env?: table) - -> function - 2. error_message: string + -> function? + 2. error_message: string? ]=] TEST [[ @@ -504,10 +504,10 @@ local <?self?> = setmetatable({ ]] [[ local self: { - __index: table, - __name: string = "obj", id: integer = 1, remove: function, + __index: table, + __name: string = "obj", } ]] @@ -772,7 +772,7 @@ local <?t?> = { ]] [[ local t: { - f: file*, + f?: file*, } ]] @@ -790,8 +790,6 @@ TEST [[ ]] [[ (global) _G: _G { - _G: _G, - _VERSION: string = "Lua 5.4", arg: string[], assert: function, collectgarbage: function, @@ -810,6 +808,8 @@ TEST [[ module: function, newproxy: function, next: function, + os: oslib, + package: packagelib, ...(+22) } ]] @@ -1733,18 +1733,18 @@ t.<?x?>() (field) t.x: unknown ]] -TEST [[ ----@class A -local a - -local b -b = a - -print(b.<?x?>) -]] -[[ -(field) A.x: unknown -]] +--TEST [[ +-----@class A +--local a +-- +--local b +--b = a +-- +--print(b.<?x?>) +--]] +--[[ +--(field) A.x: unknown +--]] TEST [[ ---@return nil @@ -1851,6 +1851,23 @@ local x: { ]] TEST [[ +local <?x?> = { + _x = '', + _y = '', + x = '', + y = '', +} +]] +[[ +local x: { + x: string = "", + y: string = "", + _x: string = "", + _y: string = "", +} +]] + +TEST [[ ---@class A ---@field x string |