diff options
Diffstat (limited to 'test')
-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 +]] |