summaryrefslogtreecommitdiff
path: root/test/type_inference/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-26 15:15:05 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-26 15:15:05 +0800
commitcbc8e42f84fdb8468d2f31797fc8a2d6344c53d4 (patch)
treec8a65bb1760fd97babcfccfadf9f3cf07b661d63 /test/type_inference/init.lua
parent3227cfa5ea12cbc471cb656606379854eb12f375 (diff)
downloadlua-language-server-cbc8e42f84fdb8468d2f31797fc8a2d6344c53d4.zip
improve generic across `fun(arg: T):T`
Diffstat (limited to 'test/type_inference/init.lua')
-rw-r--r--test/type_inference/init.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index 4eee872f..883385f8 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -427,6 +427,14 @@ local t
local k, <?v?> = next(t)
]]
+TEST 'boolean' [[
+---@generic K
+---@type fun(arg: K):K
+local f
+
+local <?r?> = f(true)
+]]
+
TEST 'string' [[
---@generic T: table, K, V
---@param t T