From 6aa90f4667b8470fe80889e5fe0f9ab4f96ae86b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 28 Apr 2021 19:56:28 +0800 Subject: generic --- test/definition/luadoc.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/definition') 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 @@ -327,6 +327,16 @@ local f local ?> = f() ]] +TEST [[ +---@generic T +---@param x T +---@return fun():T +local function f(x) end + +local v1 = f() +local ?> = v1() +]] + TEST [[ ---@class Foo local Foo = {} -- cgit v1.2.3