Skip to content

Commit 9f83958

Browse files
committed
Add tests
1 parent eeabd52 commit 9f83958

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,3 +651,17 @@ function ff2<V extends string, T extends string>(dd: DictDict<V, T>, k1: V, k2:
651651
const d: Dict<T> = dd[k1];
652652
return d[k2];
653653
}
654+
655+
// Repro from #26409
656+
657+
const cf1 = <T extends { [P in K]: string; } & { cool: string; }, K extends keyof T>(t: T, k: K) =>
658+
{
659+
const s: string = t[k];
660+
t.cool;
661+
};
662+
663+
const cf2 = <T extends { [P in K | "cool"]: string; }, K extends keyof T>(t: T, k: K) =>
664+
{
665+
const s: string = t[k];
666+
t.cool;
667+
};

0 commit comments

Comments
 (0)