Accept new baselines

This commit is contained in:
Anders Hejlsberg
2016-06-08 11:41:34 -07:00
parent 83971d0900
commit ea1bdff096
7 changed files with 65 additions and 22 deletions
@@ -133,8 +133,8 @@ function fn5(x: Derived1) {
// 1.5: y: Derived1
// Want: ???
let y = x;
>y : never
>x : never
>y : Derived1 & Derived2
>x : Derived1 & Derived2
}
}
@@ -116,6 +116,6 @@ if (!hasKind(x, "B")) {
}
else {
let d = x;
>d : never
>x : never
>d : A & B
>x : A & B
}
@@ -110,6 +110,6 @@ if (!hasKind(x, "B")) {
}
else {
let d = x;
>d : never
>x : never
>d : A & B
>x : A & B
}
@@ -113,6 +113,6 @@ if (!hasKind(x, "B")) {
}
else {
let d = x;
>d : never
>x : never
>d : A & B
>x : A & B
}
@@ -1,14 +0,0 @@
tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts(7,20): error TS2339: Property 'global' does not exist on type 'never'.
==== tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts (1 errors) ====
interface I { global: string; }
var result: I;
var result2: I;
if (!(result instanceof RegExp)) {
result = result2;
} else if (!result.global) {
~~~~~~
!!! error TS2339: Property 'global' does not exist on type 'never'.
}
@@ -0,0 +1,26 @@
=== tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts ===
interface I { global: string; }
>I : Symbol(I, Decl(typeGuardsWithInstanceOf.ts, 0, 0))
>global : Symbol(I.global, Decl(typeGuardsWithInstanceOf.ts, 0, 13))
var result: I;
>result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
>I : Symbol(I, Decl(typeGuardsWithInstanceOf.ts, 0, 0))
var result2: I;
>result2 : Symbol(result2, Decl(typeGuardsWithInstanceOf.ts, 2, 3))
>I : Symbol(I, Decl(typeGuardsWithInstanceOf.ts, 0, 0))
if (!(result instanceof RegExp)) {
>result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
>RegExp : Symbol(RegExp, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
result = result2;
>result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
>result2 : Symbol(result2, Decl(typeGuardsWithInstanceOf.ts, 2, 3))
} else if (!result.global) {
>result.global : Symbol(global, Decl(typeGuardsWithInstanceOf.ts, 0, 13), Decl(lib.d.ts, --, --))
>result : Symbol(result, Decl(typeGuardsWithInstanceOf.ts, 1, 3))
>global : Symbol(global, Decl(typeGuardsWithInstanceOf.ts, 0, 13), Decl(lib.d.ts, --, --))
}
@@ -0,0 +1,31 @@
=== tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts ===
interface I { global: string; }
>I : I
>global : string
var result: I;
>result : I
>I : I
var result2: I;
>result2 : I
>I : I
if (!(result instanceof RegExp)) {
>!(result instanceof RegExp) : boolean
>(result instanceof RegExp) : boolean
>result instanceof RegExp : boolean
>result : I
>RegExp : RegExpConstructor
result = result2;
>result = result2 : I
>result : I
>result2 : I
} else if (!result.global) {
>!result.global : boolean
>result.global : string & boolean
>result : I & RegExp
>global : string & boolean
}