diff options
Diffstat (limited to 'test-beta/diagnostics/init.lua')
-rw-r--r-- | test-beta/diagnostics/init.lua | 207 |
1 files changed, 104 insertions, 103 deletions
diff --git a/test-beta/diagnostics/init.lua b/test-beta/diagnostics/init.lua index 49d11dc2..ed850118 100644 --- a/test-beta/diagnostics/init.lua +++ b/test-beta/diagnostics/init.lua @@ -576,109 +576,6 @@ print(T6) print(T7) ]] ---TEST [[ ------@class <!Class!> ------@class <!Class!> ---]] --- ---TEST [[ ------@class A : <!B!> ---]] --- ---TEST [[ ------@class <!A : B!> ------@class <!B : C!> ------@class <!C : D!> ------@class <!D : A!> ---]] --- ---TEST [[ ------@class A : B ------@class B : C ------@class C : D ------@class D ---]] --- ---TEST [[ ------@type <!A!> ---]] --- ---TEST [[ ------@class A ------@type A|<!B!>|<!C!> ---]] --- ---TEST [[ ------@class AAA ------@alias B AAA --- ------@type B ---]] --- ---TEST [[ ------@alias B <!AAA!> ---]] --- ---TEST [[ ------@class <!A!> ------@class B ------@alias <!A B!> ---]] --- ---TEST [[ ------@param x <!Class!> ---]] --- ---TEST [[ ------@class Class ------@param <!y!> Class ---local function f(x) --- return x ---end ---f() ---]] --- ---TEST [[ ------@class Class ------@param <!y!> Class ---function F(x) --- return x ---end ---F() ---]] --- ---TEST [[ ------@class Class ------@param <!x!> Class ------@param y Class ------@param <!x!> Class ---local function f(x, y) --- return x, y ---end ---f() ---]] --- ---TEST [[ ------@field <!x Class!> ------@class Class ---]] --- ---TEST [[ ------@class Class ------@field <!x!> Class ------@field <!x!> Class ---]] --- ---TEST [[ ------@class Class : any ---]] --- ---TEST [[ ------@type fun(a: integer) ---local f ---f() ---]] - TEST [[ local x x = <!x or 0 + 1!> @@ -719,3 +616,107 @@ return t TEST [[ table.insert({}, 1, 2, <!3!>) ]] + +do return end +TEST [[ +---@class <!Class!> +---@class <!Class!> +]] + +TEST [[ +---@class A : <!B!> +]] + +TEST [[ +---@class <!A : B!> +---@class <!B : C!> +---@class <!C : D!> +---@class <!D : A!> +]] + +TEST [[ +---@class A : B +---@class B : C +---@class C : D +---@class D +]] + +TEST [[ +---@type <!A!> +]] + +TEST [[ +---@class A +---@type A|<!B!>|<!C!> +]] + +TEST [[ +---@class AAA +---@alias B AAA + +---@type B +]] + +TEST [[ +---@alias B <!AAA!> +]] + +TEST [[ +---@class <!A!> +---@class B +---@alias <!A B!> +]] + +TEST [[ +---@param x <!Class!> +]] + +TEST [[ +---@class Class +---@param <!y!> Class +local function f(x) + return x +end +f() +]] + +TEST [[ +---@class Class +---@param <!y!> Class +function F(x) + return x +end +F() +]] + +TEST [[ +---@class Class +---@param <!x!> Class +---@param y Class +---@param <!x!> Class +local function f(x, y) + return x, y +end +f() +]] + +TEST [[ +---@field <!x Class!> +---@class Class +]] + +TEST [[ +---@class Class +---@field <!x!> Class +---@field <!x!> Class +]] + +TEST [[ +---@class Class : any +]] + +TEST [[ +---@type fun(a: integer) +local f +f() +]] |