From c6a670d26cddfe97790e2f3c2d4c1670860b2b2f Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 17 May 2019 15:59:01 -0700 Subject: [PATCH] Add regression test --- .../conformance/types/keyof/keyofAndIndexedAccess2.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts index 5251a83bb0611..a99c2b0a7a106 100644 --- a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts +++ b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts @@ -138,3 +138,12 @@ function fn4() { let x: Array[K] = 'abc'; let y: ReadonlyArray[K] = 'abc'; } + +// Repro from #31439 + +export class c { + [x: string]: string; + constructor() { + this["a"] = "b"; + } +}