diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-29 11:13:07 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-29 11:13:07 +0800 |
commit | f7905e759ec7be0188b7f237eeb531bc111695af (patch) | |
tree | 3506acfffc7d10307457629725bec2b09accf81e /test | |
parent | 265e5f81721c29d4351b5b6bffea612d31354ed4 (diff) | |
download | lua-language-server-f7905e759ec7be0188b7f237eeb531bc111695af.zip |
#450 fix generic from method call
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index f45e6a9e..08bac1eb 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -606,3 +606,15 @@ function m:f() return <?self?> end ]] + +TEST 'Cls' [[ +---@class Cls +local Cls = {} + +---@generic T +---@param self T +---@return T +function Cls.new(self) return self end + +local <?test?> = Cls:new() +]] |