diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-05 17:12:07 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-05 17:12:07 +0800 |
commit | bc1baf261f3552ab5a6731389bd21824530a454b (patch) | |
tree | 38f5aaf86d09bd77a3aaacef6e376289b2cd918d /test | |
parent | 788709d4e2a2ae1d412a0afcfddbfbce19d04099 (diff) | |
download | lua-language-server-bc1baf261f3552ab5a6731389bd21824530a454b.zip |
resolve #511
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 11 |
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?>) +]] |