From bc1baf261f3552ab5a6731389bd21824530a454b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 5 Jul 2021 17:12:07 +0800 Subject: resolve #511 --- test/type_inference/init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 3df73863..83e73487 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -867,3 +867,14 @@ end xpcall(work, debug.traceback, function () end) ]] + +TEST 'string' [[ +---@generic T +---@param x T +---@return { x: T } +local function f(x) end + +local t = f('') + +print(t.) +]] -- cgit v1.2.3