summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-29 14:04:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-29 14:04:32 +0800
commit90c4b35ef7486f460aaf0c32072f6c142ca74bb0 (patch)
treeb56371c99226908018a0d8f1db5a30642580e3ce /test
parentf7905e759ec7be0188b7f237eeb531bc111695af (diff)
downloadlua-language-server-90c4b35ef7486f460aaf0c32072f6c142ca74bb0.zip
stash
Diffstat (limited to 'test')
-rw-r--r--test/type_inference/init.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 08bac1eb..dde3f319 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -618,3 +618,15 @@ function Cls.new(self) return self end
local <?test?> = Cls:new()
]]
+
+TEST 'Cls' [[
+---@class Cls
+local Cls = {}
+
+---@generic T
+---@param self T
+---@return T
+function Cls:new() return self end
+
+local <?test?> = Cls:new()
+]]