diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-26 15:15:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-26 15:15:05 +0800 |
commit | cbc8e42f84fdb8468d2f31797fc8a2d6344c53d4 (patch) | |
tree | c8a65bb1760fd97babcfccfadf9f3cf07b661d63 /test/type_inference | |
parent | 3227cfa5ea12cbc471cb656606379854eb12f375 (diff) | |
download | lua-language-server-cbc8e42f84fdb8468d2f31797fc8a2d6344c53d4.zip |
improve generic across `fun(arg: T):T`
Diffstat (limited to 'test/type_inference')
-rw-r--r-- | test/type_inference/init.lua | 8 |
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 |