summaryrefslogtreecommitdiff
path: root/test/type_inference
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-19 10:50:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-19 10:50:55 +0800
commitddadd638917035ee4169da8942b6e4d4eb59cb66 (patch)
treecf0aba243e1e81435698722ce58613a5e7616e96 /test/type_inference
parentf709ab24a21d444af78b2b91b20b191acd35d877 (diff)
downloadlua-language-server-ddadd638917035ee4169da8942b6e4d4eb59cb66.zip
fix #1345
Diffstat (limited to 'test/type_inference')
-rw-r--r--test/type_inference/init.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index e4baf4a4..43fb3c62 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -3726,3 +3726,14 @@ local m = {}
print(<?m?>)
]]
+
+TEST 'A' [[
+---@class A
+---@overload fun():A
+local m = {}
+
+---@return A
+function m:init()
+ return <?self?>
+end
+]]