diff --git a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts index c76071f7d99..7748240f80d 100644 --- a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts +++ b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess.ts @@ -651,3 +651,17 @@ function ff2(dd: DictDict, k1: V, k2: const d: Dict = dd[k1]; return d[k2]; } + +// Repro from #26409 + +const cf1 = (t: T, k: K) => +{ + const s: string = t[k]; + t.cool; +}; + +const cf2 = (t: T, k: K) => +{ + const s: string = t[k]; + t.cool; +};