diff options
Diffstat (limited to 'test/hover')
-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 |