From 3827d18e5b84d5372334ee8151362f935edf8ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 9 Jun 2022 15:50:48 +0800 Subject: #1148 view `table` after erasing alias --- test/type_inference/init.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'test/type_inference/init.lua') diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua index 5f54cebf..41421ea9 100644 --- a/test/type_inference/init.lua +++ b/test/type_inference/init.lua @@ -2349,3 +2349,24 @@ TEST 'number' [[ for in _ do end ]] + +TEST 'table' [[ +---@alias tp table + +---@type tp +local +]] + +TEST 'table' [[ +---@alias tp {name: boolean} + +---@type tp +local +]] + +TEST 'boolean|table' [[ +---@alias tp boolean | {name: boolean} + +---@type tp +local +]] -- cgit v1.2.3