diff --git a/tests/cases/compiler/infiniteConstraints.ts b/tests/cases/compiler/infiniteConstraints.ts index 70d3879da6b..e914b738efc 100644 --- a/tests/cases/compiler/infiniteConstraints.ts +++ b/tests/cases/compiler/infiniteConstraints.ts @@ -31,3 +31,8 @@ const noError = ensureNoDuplicates({main: value("test"), alternate: value("test2 const shouldBeNoError = ensureNoDuplicates({main: value("test")}); const shouldBeError = ensureNoDuplicates({main: value("dup"), alternate: value("dup")}); + +// Repro from #26448 + +type Cond = T extends number ? number : never; +declare function function1}>(): T[keyof T]["foo"];