From 472ab7c8aa702683901eab73b9767d5db0e25167 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Tue, 12 Apr 2016 13:40:28 -0700 Subject: [PATCH] Accepting new baselines --- .../reference/controlFlowWhileStatement.js | 4 +++ .../controlFlowWhileStatement.symbols | 34 +++++++++++-------- .../reference/controlFlowWhileStatement.types | 6 ++++ 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/tests/baselines/reference/controlFlowWhileStatement.js b/tests/baselines/reference/controlFlowWhileStatement.js index fc975764ce1..2dfb716f7cc 100644 --- a/tests/baselines/reference/controlFlowWhileStatement.js +++ b/tests/baselines/reference/controlFlowWhileStatement.js @@ -38,7 +38,9 @@ function e() { let x: string | number; x = ""; while (cond) { + x; // string | number x = 42; + x; // number } x; // string | number } @@ -117,7 +119,9 @@ function e() { var x; x = ""; while (cond) { + x; // string | number x = 42; + x; // number } x; // string | number } diff --git a/tests/baselines/reference/controlFlowWhileStatement.symbols b/tests/baselines/reference/controlFlowWhileStatement.symbols index 27e1b533d14..01af3654f3c 100644 --- a/tests/baselines/reference/controlFlowWhileStatement.symbols +++ b/tests/baselines/reference/controlFlowWhileStatement.symbols @@ -98,22 +98,28 @@ function e() { while (cond) { >cond : Symbol(cond, Decl(controlFlowWhileStatement.ts, 0, 3)) + x; // string | number +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 36, 7)) + x = 42; >x : Symbol(x, Decl(controlFlowWhileStatement.ts, 36, 7)) + + x; // number +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 36, 7)) } x; // string | number >x : Symbol(x, Decl(controlFlowWhileStatement.ts, 36, 7)) } function f() { ->f : Symbol(f, Decl(controlFlowWhileStatement.ts, 42, 1)) +>f : Symbol(f, Decl(controlFlowWhileStatement.ts, 44, 1)) let x: string | number | boolean | RegExp | Function; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 44, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 46, 7)) >RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) x = ""; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 44, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 46, 7)) while (cond) { >cond : Symbol(cond, Decl(controlFlowWhileStatement.ts, 0, 3)) @@ -122,7 +128,7 @@ function f() { >cond : Symbol(cond, Decl(controlFlowWhileStatement.ts, 0, 3)) x = 42; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 44, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 46, 7)) break; } @@ -130,33 +136,33 @@ function f() { >cond : Symbol(cond, Decl(controlFlowWhileStatement.ts, 0, 3)) x = true; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 44, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 46, 7)) continue; } x = /a/; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 44, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 46, 7)) } x; // string | number | boolean | RegExp ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 44, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 46, 7)) } function g() { ->g : Symbol(g, Decl(controlFlowWhileStatement.ts, 58, 1)) +>g : Symbol(g, Decl(controlFlowWhileStatement.ts, 60, 1)) let x: string | number | boolean | RegExp | Function; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 60, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 62, 7)) >RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) x = ""; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 60, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 62, 7)) while (true) { if (cond) { >cond : Symbol(cond, Decl(controlFlowWhileStatement.ts, 0, 3)) x = 42; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 60, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 62, 7)) break; } @@ -164,14 +170,14 @@ function g() { >cond : Symbol(cond, Decl(controlFlowWhileStatement.ts, 0, 3)) x = true; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 60, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 62, 7)) continue; } x = /a/; ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 60, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 62, 7)) } x; // number ->x : Symbol(x, Decl(controlFlowWhileStatement.ts, 60, 7)) +>x : Symbol(x, Decl(controlFlowWhileStatement.ts, 62, 7)) } diff --git a/tests/baselines/reference/controlFlowWhileStatement.types b/tests/baselines/reference/controlFlowWhileStatement.types index 7c99b152048..3658a20897a 100644 --- a/tests/baselines/reference/controlFlowWhileStatement.types +++ b/tests/baselines/reference/controlFlowWhileStatement.types @@ -117,10 +117,16 @@ function e() { while (cond) { >cond : boolean + x; // string | number +>x : string | number + x = 42; >x = 42 : number >x : string | number >42 : number + + x; // number +>x : number } x; // string | number >x : string | number