diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-10-22 14:22:36 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-10-22 14:22:36 +0800 |
commit | 2881d5d769033594dca45d659509fa0de3c746bf (patch) | |
tree | 1c5b22256cca22f159d64e6920982a12bd099fbb /test-beta/diagnostics/init.lua | |
parent | 57dd96177c217611de4aced4efde94106ee389d3 (diff) | |
download | lua-language-server-2881d5d769033594dca45d659509fa0de3c746bf.zip |
暂存
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() +]] |