From c816cf2562cf6b6b72c05466bcd1b807cbb514ea Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 16 Aug 2019 07:45:02 -0700 Subject: [PATCH] Add additional test --- .../typeInference/unionTypeInference.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts b/tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts index 6203da5e989..2252070fee3 100644 --- a/tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts +++ b/tests/cases/conformance/types/typeRelationships/typeInference/unionTypeInference.ts @@ -69,3 +69,12 @@ async function fun(deepPromised: DeepPromised) { await fun(awaitedValue); } } + +// Repro from #32752 + +type Deep = { [K in keyof T]: T[K] | Deep }; + +declare function baz(dp: Deep): T; +declare let xx: { a: string | undefined }; + +baz(xx);