Accepting new baselines

This commit is contained in:
Anders Hejlsberg 2016-03-21 16:28:09 -07:00
parent 413d9a639f
commit fb6255a7e4
2 changed files with 11 additions and 81 deletions

View file

@ -1,70 +0,0 @@
=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormTypeOfNotEqualHasNoEffect.ts ===
class C { private p: string };
>C : Symbol(C, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 0, 0))
>p : Symbol(C.p, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 0, 9))
var strOrNum: string | number;
>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3))
var strOrBool: string | boolean;
>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3))
var numOrBool: number | boolean
>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3))
var strOrC: string | C;
>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3))
>C : Symbol(C, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 0, 0))
// typeof x != s has not effect on typeguard
if (typeof strOrNum != "string") {
>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3))
var r1 = strOrNum; // string | number
>r1 : Symbol(r1, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 9, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 12, 7))
>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3))
}
else {
var r1 = strOrNum; // string | number
>r1 : Symbol(r1, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 9, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 12, 7))
>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 2, 3))
}
if (typeof strOrBool != "boolean") {
>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3))
var r2 = strOrBool; // string | boolean
>r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 16, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 19, 7))
>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3))
}
else {
var r2 = strOrBool; // string | boolean
>r2 : Symbol(r2, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 16, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 19, 7))
>strOrBool : Symbol(strOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 3, 3))
}
if (typeof numOrBool != "number") {
>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3))
var r3 = numOrBool; // number | boolean
>r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 23, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 26, 7))
>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3))
}
else {
var r3 = numOrBool; // number | boolean
>r3 : Symbol(r3, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 23, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 26, 7))
>numOrBool : Symbol(numOrBool, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 4, 3))
}
if (typeof strOrC != "Object") {
>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3))
var r4 = strOrC; // string | C
>r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 30, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 33, 7))
>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3))
}
else {
var r4 = strOrC; // string | C
>r4 : Symbol(r4, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 30, 7), Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 33, 7))
>strOrC : Symbol(strOrC, Decl(typeGuardOfFormTypeOfNotEqualHasNoEffect.ts, 5, 3))
}

View file

@ -8,16 +8,16 @@ class D {
>D : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0))
data: string | string[];
>data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
getData() {
>getData : Symbol(getData, Decl(typeGuardsOnClassProperty.ts, 6, 28))
>getData : Symbol(D.getData, Decl(typeGuardsOnClassProperty.ts, 6, 28))
var data = this.data;
>data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 8, 11))
>this.data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this.data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0))
>data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
return typeof data === "string" ? data : data.join(" ");
>data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 8, 11))
@ -28,19 +28,19 @@ class D {
}
getData1() {
>getData1 : Symbol(getData1, Decl(typeGuardsOnClassProperty.ts, 10, 5))
>getData1 : Symbol(D.getData1, Decl(typeGuardsOnClassProperty.ts, 10, 5))
return typeof this.data === "string" ? this.data : this.data.join(" ");
>this.data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this.data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0))
>data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this.data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this.data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0))
>data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this.data.join : Symbol(Array.join, Decl(lib.d.ts, --, --))
>this.data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this.data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>this : Symbol(D, Decl(typeGuardsOnClassProperty.ts, 0, 0))
>data : Symbol(data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>data : Symbol(D.data, Decl(typeGuardsOnClassProperty.ts, 5, 9))
>join : Symbol(Array.join, Decl(lib.d.ts, --, --))
}
}