summaryrefslogtreecommitdiff
path: root/test/definition
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-28 19:56:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-28 19:56:28 +0800
commit6aa90f4667b8470fe80889e5fe0f9ab4f96ae86b (patch)
treed15ff1aba4439025522c6441080887afb4e3765b /test/definition
parent79979fede8d754ae12a21843f12e45b54acd24d0 (diff)
downloadlua-language-server-6aa90f4667b8470fe80889e5fe0f9ab4f96ae86b.zip
generic
Diffstat (limited to 'test/definition')
-rw-r--r--test/definition/luadoc.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/definition/luadoc.lua b/test/definition/luadoc.lua
index 61f203f5..a971dfe1 100644
--- a/test/definition/luadoc.lua
+++ b/test/definition/luadoc.lua
@@ -328,6 +328,16 @@ local <?<!f2!>?> = f()
]]
TEST [[
+---@generic T
+---@param x T
+---@return fun():T
+local function f(x) end
+
+local v1 = f(<!{}!>)
+local <?<!v2!>?> = v1()
+]]
+
+TEST [[
---@class Foo
local Foo = {}
function Foo:<!bar1!>() end