Accept new baselines

This commit is contained in:
Anders Hejlsberg 2016-10-08 15:27:57 -07:00
parent d202b1c037
commit 89826a52ad
3 changed files with 64 additions and 0 deletions

View File

@ -137,6 +137,15 @@ function f14() {
x.push("hello");
x.push(true);
return x; // (string | number | boolean)[]
}
function f15() {
let x = [];
while (cond()) {
while (cond()) {}
x.push("hello");
}
return x; // string[]
}
//// [controlFlowArrays.js]
@ -265,3 +274,11 @@ function f14() {
x.push(true);
return x; // (string | number | boolean)[]
}
function f15() {
var x = [];
while (cond()) {
while (cond()) { }
x.push("hello");
}
return x; // string[]
}

View File

@ -348,3 +348,24 @@ function f14() {
return x; // (string | number | boolean)[]
>x : Symbol(x, Decl(controlFlowArrays.ts, 133, 9))
}
function f15() {
>f15 : Symbol(f15, Decl(controlFlowArrays.ts, 138, 1))
let x = [];
>x : Symbol(x, Decl(controlFlowArrays.ts, 141, 7))
while (cond()) {
>cond : Symbol(cond, Decl(controlFlowArrays.ts, 0, 0))
while (cond()) {}
>cond : Symbol(cond, Decl(controlFlowArrays.ts, 0, 0))
x.push("hello");
>x.push : Symbol(Array.push, Decl(lib.d.ts, --, --))
>x : Symbol(x, Decl(controlFlowArrays.ts, 141, 7))
>push : Symbol(Array.push, Decl(lib.d.ts, --, --))
}
return x; // string[]
>x : Symbol(x, Decl(controlFlowArrays.ts, 141, 7))
}

View File

@ -445,3 +445,29 @@ function f14() {
return x; // (string | number | boolean)[]
>x : (string | number | boolean)[]
}
function f15() {
>f15 : () => string[]
let x = [];
>x : any[]
>[] : never[]
while (cond()) {
>cond() : boolean
>cond : () => boolean
while (cond()) {}
>cond() : boolean
>cond : () => boolean
x.push("hello");
>x.push("hello") : number
>x.push : (...items: any[]) => number
>x : any[]
>push : (...items: any[]) => number
>"hello" : "hello"
}
return x; // string[]
>x : string[]
}