From fa46b6087785f078ed47c06b16735ea1a0b55e8e Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 25 Aug 2020 13:19:51 -1000 Subject: [PATCH] Add regression test --- tests/cases/conformance/types/tuple/variadicTuples1.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/cases/conformance/types/tuple/variadicTuples1.ts b/tests/cases/conformance/types/tuple/variadicTuples1.ts index d2e54ba2c12..eeafb515102 100644 --- a/tests/cases/conformance/types/tuple/variadicTuples1.ts +++ b/tests/cases/conformance/types/tuple/variadicTuples1.ts @@ -389,3 +389,13 @@ function callApi(method: (...args: [...T, ob callApi(getUser); callApi(getOrgUser); + +// Repro from #40235 + +type Numbers = number[]; +type Unbounded = [...Numbers, boolean]; +const data: Unbounded = [false, false]; + +type U1 = [string, ...Numbers, boolean]; +type U2 = [...[string, ...Numbers], boolean]; +type U3 = [...[string, number], boolean];