summaryrefslogtreecommitdiff
path: root/test/type_inference/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/type_inference/init.lua')
-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?>)
+]]