From cd646dab7e3b24667cf1af9e00b9bd67c5ac5dfd Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Sat, 6 Apr 2019 07:59:39 -1000 Subject: [PATCH] Add tests --- .../typeInference/unionAndIntersectionInference3.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.ts diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.ts b/tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.ts new file mode 100644 index 00000000000..aad083a626b --- /dev/null +++ b/tests/cases/conformance/types/typeRelationships/typeInference/unionAndIntersectionInference3.ts @@ -0,0 +1,7 @@ +// @strict: true + +// Repro from #30720 + +type Maybe = T | undefined; +declare function concatMaybe(...args: (Maybe | Maybe[])[]): T[]; +concatMaybe([1, 2, 3], 4);