diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-25 20:13:42 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-25 20:13:42 +0800 |
commit | 2c6f0f9bf83f9a44c466aaf0d45ed9f8eab6c117 (patch) | |
tree | 96b11b2863b0a1e10158e6ad6cc5df3b8fb74716 /test/type_inference/init.lua | |
parent | 7b809496a5a4be6a182d715b264493cb39c98674 (diff) | |
download | lua-language-server-2c6f0f9bf83f9a44c466aaf0d45ed9f8eab6c117.zip |
resolve #1226
semicolons and parentheses can be used in `DocTable`
Diffstat (limited to 'test/type_inference/init.lua')
-rw-r--r-- | test/type_inference/init.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 434307a2..8cf98da5 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -3043,3 +3043,24 @@ local b local <?x?> = a[b] ]] + +TEST 'number' [[ +---@type {x: string ; y: boolean; z: number} +local t + +local <?z?> = t.z +]] + +TEST 'fun():number, boolean' [[ +---@type {f: fun():number, boolean} +local t + +local <?f?> = t.f +]] + +TEST 'fun():number' [[ +---@type {(f: fun():number), x: boolean} +local t + +local <?f?> = t.f +]] |