Skip to content

Commit c6a670d

Browse files
committed
Add regression test
1 parent d67fe13 commit c6a670d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,12 @@ function fn4<K extends number>() {
138138
let x: Array<string>[K] = 'abc';
139139
let y: ReadonlyArray<string>[K] = 'abc';
140140
}
141+
142+
// Repro from #31439
143+
144+
export class c {
145+
[x: string]: string;
146+
constructor() {
147+
this["a"] = "b";
148+
}
149+
}

0 commit comments

Comments
 (0)