diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-03-10 20:11:36 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-03-10 20:11:36 +0800 |
commit | 38a2b7f9df15b8737ba6fba27861eba50b2277b6 (patch) | |
tree | 5c48cf092b813837801b8ff09e52f99e392fbe84 /test | |
parent | c5170054e2873592c3967d440cb4debb42a09324 (diff) | |
download | lua-language-server-38a2b7f9df15b8737ba6fba27861eba50b2277b6.zip |
update
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 5ebe5778..37aa24b0 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -381,10 +381,36 @@ local <?x?> ]] TEST '"enum1"|"enum2"' [[ +---@type 'enum1' | 'enum2' +local <?x?> +]] + +TEST '"enum1"|"enum2"' [[ ---@type '"enum1"' | '"enum2"' local <?x?> ]] +TEST 'A' [[ +---@alias A 'enum1' | 'enum2' + +---@type A +local <?x?> +]] + +TEST 'A' [[ +---@alias A 'enum1' | 'enum2' | A + +---@type A +local <?x?> +]] + +TEST 'A' [[ +---@alias A 'enum1' | 'enum2' | B + +---@type A +local <?x?> +]] + TEST 'fun()' [[ ---@type fun() local <?x?> |