Accept new baselines

This commit is contained in:
Anders Hejlsberg
2016-10-11 10:32:00 -07:00
parent e9858de363
commit c9e2f95918
3 changed files with 98 additions and 0 deletions

View File

@@ -146,6 +146,15 @@ function f15() {
x.push("hello");
}
return x; // string[]
}
function f16() {
let x;
let y;
(x = [], x).push(5);
(x.push("hello"), x).push(true);
((x))[3] = { a: 1 };
return x; // (string | number | boolean | { a: number })[]
}
//// [controlFlowArrays.js]
@@ -282,3 +291,11 @@ function f15() {
}
return x; // string[]
}
function f16() {
var x;
var y;
(x = [], x).push(5);
(x.push("hello"), x).push(true);
((x))[3] = { a: 1 };
return x; // (string | number | boolean | { a: number })[]
}

View File

@@ -369,3 +369,34 @@ function f15() {
return x; // string[]
>x : Symbol(x, Decl(controlFlowArrays.ts, 141, 7))
}
function f16() {
>f16 : Symbol(f16, Decl(controlFlowArrays.ts, 147, 1))
let x;
>x : Symbol(x, Decl(controlFlowArrays.ts, 150, 7))
let y;
>y : Symbol(y, Decl(controlFlowArrays.ts, 151, 7))
(x = [], x).push(5);
>(x = [], x).push : Symbol(Array.push, Decl(lib.d.ts, --, --))
>x : Symbol(x, Decl(controlFlowArrays.ts, 150, 7))
>x : Symbol(x, Decl(controlFlowArrays.ts, 150, 7))
>push : Symbol(Array.push, Decl(lib.d.ts, --, --))
(x.push("hello"), x).push(true);
>(x.push("hello"), x).push : Symbol(Array.push, Decl(lib.d.ts, --, --))
>x.push : Symbol(Array.push, Decl(lib.d.ts, --, --))
>x : Symbol(x, Decl(controlFlowArrays.ts, 150, 7))
>push : Symbol(Array.push, Decl(lib.d.ts, --, --))
>x : Symbol(x, Decl(controlFlowArrays.ts, 150, 7))
>push : Symbol(Array.push, Decl(lib.d.ts, --, --))
((x))[3] = { a: 1 };
>x : Symbol(x, Decl(controlFlowArrays.ts, 150, 7))
>a : Symbol(a, Decl(controlFlowArrays.ts, 154, 16))
return x; // (string | number | boolean | { a: number })[]
>x : Symbol(x, Decl(controlFlowArrays.ts, 150, 7))
}

View File

@@ -471,3 +471,53 @@ function f15() {
return x; // string[]
>x : string[]
}
function f16() {
>f16 : () => (string | number | boolean | { a: number; })[]
let x;
>x : any
let y;
>y : any
(x = [], x).push(5);
>(x = [], x).push(5) : number
>(x = [], x).push : (...items: any[]) => number
>(x = [], x) : any[]
>x = [], x : any[]
>x = [] : never[]
>x : any
>[] : never[]
>x : any[]
>push : (...items: any[]) => number
>5 : 5
(x.push("hello"), x).push(true);
>(x.push("hello"), x).push(true) : number
>(x.push("hello"), x).push : (...items: any[]) => number
>(x.push("hello"), x) : any[]
>x.push("hello"), x : any[]
>x.push("hello") : number
>x.push : (...items: any[]) => number
>x : any[]
>push : (...items: any[]) => number
>"hello" : "hello"
>x : any[]
>push : (...items: any[]) => number
>true : true
((x))[3] = { a: 1 };
>((x))[3] = { a: 1 } : { a: number; }
>((x))[3] : any
>((x)) : any[]
>(x) : any[]
>x : any[]
>3 : 3
>{ a: 1 } : { a: number; }
>a : number
>1 : 1
return x; // (string | number | boolean | { a: number })[]
>x : (string | number | boolean | { a: number; })[]
}