diff --git a/tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts b/tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts index 278d72595cd..2a756788f6f 100644 --- a/tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts +++ b/tests/cases/conformance/types/intersection/intersectionWithUnionConstraint.ts @@ -34,3 +34,8 @@ type Example = { [K in keyof T]: K extends keyof U ? UnexpectedError : type UnexpectedError = T type NoErrorHere = T + +// Repro from #30331 + +type a = T extends Array ? U : never; +type b = { [K in a & keyof T ]: 42 };