mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 21:07:52 -05:00
Add regression test
This commit is contained in:
@@ -138,3 +138,12 @@ function fn4<K extends number>() {
|
||||
let x: Array<string>[K] = 'abc';
|
||||
let y: ReadonlyArray<string>[K] = 'abc';
|
||||
}
|
||||
|
||||
// Repro from #31439
|
||||
|
||||
export class c {
|
||||
[x: string]: string;
|
||||
constructor() {
|
||||
this["a"] = "b";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user