diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-08-10 17:04:20 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-08-10 17:04:20 +0800 |
commit | 63211177f8f3ad2a50dca3ab2ccaae737486813c (patch) | |
tree | fa13aaf9674258efc6a4625650dfe7572988b7e8 /test/type_inference | |
parent | c3c73efb8fbb3e37d0191d3f924283861218a358 (diff) | |
download | lua-language-server-63211177f8f3ad2a50dca3ab2ccaae737486813c.zip |
support `@type` for `return`
#2144
Diffstat (limited to 'test/type_inference')
-rw-r--r-- | test/type_inference/init.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 9f5c8493..aba6b0b4 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -4314,6 +4314,7 @@ repeat until <?x?> ]] +-- #2144 TEST 'A' [=[ local function f() return {} --[[@as A]] @@ -4321,3 +4322,13 @@ end local <?x?> = f() ]=] + +TEST 'A' [=[ +local function f() + ---@type A + return {} +end + +local <?x?> = f() +]=] +-- |