Skip to content

Commit 89826a5

Browse files
committed
Accept new baselines
1 parent d202b1c commit 89826a5

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

tests/baselines/reference/controlFlowArrays.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,15 @@ function f14() {
137137
x.push("hello");
138138
x.push(true);
139139
return x; // (string | number | boolean)[]
140+
}
141+
142+
function f15() {
143+
let x = [];
144+
while (cond()) {
145+
while (cond()) {}
146+
x.push("hello");
147+
}
148+
return x; // string[]
140149
}
141150

142151
//// [controlFlowArrays.js]
@@ -265,3 +274,11 @@ function f14() {
265274
x.push(true);
266275
return x; // (string | number | boolean)[]
267276
}
277+
function f15() {
278+
var x = [];
279+
while (cond()) {
280+
while (cond()) { }
281+
x.push("hello");
282+
}
283+
return x; // string[]
284+
}

tests/baselines/reference/controlFlowArrays.symbols

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,3 +348,24 @@ function f14() {
348348
return x; // (string | number | boolean)[]
349349
>x : Symbol(x, Decl(controlFlowArrays.ts, 133, 9))
350350
}
351+
352+
function f15() {
353+
>f15 : Symbol(f15, Decl(controlFlowArrays.ts, 138, 1))
354+
355+
let x = [];
356+
>x : Symbol(x, Decl(controlFlowArrays.ts, 141, 7))
357+
358+
while (cond()) {
359+
>cond : Symbol(cond, Decl(controlFlowArrays.ts, 0, 0))
360+
361+
while (cond()) {}
362+
>cond : Symbol(cond, Decl(controlFlowArrays.ts, 0, 0))
363+
364+
x.push("hello");
365+
>x.push : Symbol(Array.push, Decl(lib.d.ts, --, --))
366+
>x : Symbol(x, Decl(controlFlowArrays.ts, 141, 7))
367+
>push : Symbol(Array.push, Decl(lib.d.ts, --, --))
368+
}
369+
return x; // string[]
370+
>x : Symbol(x, Decl(controlFlowArrays.ts, 141, 7))
371+
}

tests/baselines/reference/controlFlowArrays.types

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,29 @@ function f14() {
445445
return x; // (string | number | boolean)[]
446446
>x : (string | number | boolean)[]
447447
}
448+
449+
function f15() {
450+
>f15 : () => string[]
451+
452+
let x = [];
453+
>x : any[]
454+
>[] : never[]
455+
456+
while (cond()) {
457+
>cond() : boolean
458+
>cond : () => boolean
459+
460+
while (cond()) {}
461+
>cond() : boolean
462+
>cond : () => boolean
463+
464+
x.push("hello");
465+
>x.push("hello") : number
466+
>x.push : (...items: any[]) => number
467+
>x : any[]
468+
>push : (...items: any[]) => number
469+
>"hello" : "hello"
470+
}
471+
return x; // string[]
472+
>x : string[]
473+
}

0 commit comments

Comments
 (0)