Skip to content

Commit

Permalink
Accept new baselines
Browse files Browse the repository at this point in the history
  • Loading branch information
ahejlsberg committed May 17, 2019
1 parent c6a670d commit 41a3f83
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/baselines/reference/keyofAndIndexedAccess2.errors.txt
Expand Up @@ -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";
}
}

15 changes: 15 additions & 0 deletions tests/baselines/reference/keyofAndIndexedAccess2.js
Expand Up @@ -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]
Expand Down Expand Up @@ -226,3 +235,9 @@ function fn4() {
let x = 'abc';
let y = 'abc';
}
// Repro from #31439
export class c {
constructor() {
this["a"] = "b";
}
}
14 changes: 14 additions & 0 deletions tests/baselines/reference/keyofAndIndexedAccess2.symbols
Expand Up @@ -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))
}
}

18 changes: 18 additions & 0 deletions tests/baselines/reference/keyofAndIndexedAccess2.types
Expand Up @@ -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"
}
}

0 comments on commit 41a3f83

Please sign in to comment.