diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/type_inference/init.lua | 11 |
1 files changed, 8 insertions, 3 deletions
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 <?x?> ]] -TEST 'table' [[ +TEST '{ [string]: string }' [[ ---@type { [string]: string } local <?x?> ]] @@ -2439,14 +2439,14 @@ TEST 'table' [[ local <?x?> ]] -TEST 'table' [[ +TEST '{ name: boolean }' [[ ---@alias tp {name: boolean} ---@type tp local <?x?> ]] -TEST 'boolean|table' [[ +TEST 'boolean|{ name: boolean }' [[ ---@alias tp boolean | {name: boolean} ---@type tp @@ -3376,3 +3376,8 @@ TEST 'A' [[ ---@diagnostic disable local <?t?> ]] + +TEST '{ [string]: number, [true]: string, [1]: boolean, tag: integer }' [[ +---@type {[string]: number, [true]: string, [1]: boolean, tag: integer} +local <?t?> +]] |