Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed May 22, 2019
1 parent 8120094 commit 2fd4aae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts
Expand Up @@ -147,3 +147,13 @@ export class c {
this["a"] = "b";
}
}

// Repro from #31385

type Foo<T> = { [key: string]: { [K in keyof T]: K }[keyof T] };

type Bar<T> = { [key: string]: { [K in keyof T]: [K] }[keyof T] };

type Baz<T, Q extends Foo<T>> = { [K in keyof Q]: T[Q[K]] };

type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };

0 comments on commit 2fd4aae

Please sign in to comment.