Accept new baselines

This commit is contained in:
Anders Hejlsberg 2019-05-17 15:59:07 -07:00
parent c6a670d26c
commit 41a3f83b4e
4 changed files with 56 additions and 0 deletions

View File

@ -219,4 +219,13 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts(108,5): error TS23
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";
}
}

View File

@ -136,6 +136,15 @@ 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";
}
}
//// [keyofAndIndexedAccess2.js]
@ -226,3 +235,9 @@ function fn4() {
let x = 'abc';
let y = 'abc';
}
// Repro from #31439
export class c {
constructor() {
this["a"] = "b";
}
}

View File

@ -503,3 +503,17 @@ function fn4<K extends number>() {
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 133, 13))
}
// Repro from #31439
export class c {
>c : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1))
[x: string]: string;
>x : Symbol(x, Decl(keyofAndIndexedAccess2.ts, 141, 3))
constructor() {
this["a"] = "b";
>this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1))
}
}

View File

@ -499,3 +499,21 @@ function fn4<K extends number>() {
>'abc' : "abc"
}
// Repro from #31439
export class c {
>c : c
[x: string]: string;
>x : string
constructor() {
this["a"] = "b";
>this["a"] = "b" : "b"
>this["a"] : string
>this : this
>"a" : "a"
>"b" : "b"
}
}