summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-05 17:12:07 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-05 17:12:07 +0800
commitbc1baf261f3552ab5a6731389bd21824530a454b (patch)
tree38f5aaf86d09bd77a3aaacef6e376289b2cd918d /test
parent788709d4e2a2ae1d412a0afcfddbfbce19d04099 (diff)
downloadlua-language-server-bc1baf261f3552ab5a6731389bd21824530a454b.zip
resolve #511
Diffstat (limited to 'test')
-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 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 (<?value?>)
end)
]]
+
+TEST 'string' [[
+---@generic T
+---@param x T
+---@return { x: T }
+local function f(x) end
+
+local t = f('')
+
+print(t.<?x?>)
+]]