From 48c53a36c6bad6662aabc8af98fb58d54ad9a498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 5 Jul 2022 21:15:08 +0800 Subject: resolve #1065 show detail for `doc.type.table` --- test/type_inference/init.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test/type_inference') diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 94ee5638..8e9e134f 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -520,7 +520,7 @@ TEST 'fun(a: string, b: any, c?: boolean, ...any):c, d?, ...unknown' [[ local ]] -TEST 'table' [[ +TEST '{ [string]: string }' [[ ---@type { [string]: string } local ]] @@ -2439,14 +2439,14 @@ TEST 'table' [[ local ]] -TEST 'table' [[ +TEST '{ name: boolean }' [[ ---@alias tp {name: boolean} ---@type tp local ]] -TEST 'boolean|table' [[ +TEST 'boolean|{ name: boolean }' [[ ---@alias tp boolean | {name: boolean} ---@type tp @@ -3376,3 +3376,8 @@ TEST 'A' [[ ---@diagnostic disable local ]] + +TEST '{ [string]: number, [true]: string, [1]: boolean, tag: integer }' [[ +---@type {[string]: number, [true]: string, [1]: boolean, tag: integer} +local +]] -- cgit v1.2.3