TypeScript/tests/baselines/reference/typeGuardOfFormIsType.symbols
2016-03-16 13:45:55 -07:00

132 lines
5.4 KiB
Plaintext

=== tests/cases/conformance/expressions/typeGuards/typeGuardOfFormIsType.ts ===
class C1 {
>C1 : Symbol(C1, Decl(typeGuardOfFormIsType.ts, 0, 0))
p1: string;
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
}
class C2 {
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))
p2: number;
>p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 4, 10))
}
class D1 extends C1 {
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 6, 1))
>C1 : Symbol(C1, Decl(typeGuardOfFormIsType.ts, 0, 0))
p3: number;
>p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 7, 21))
}
var str: string;
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 10, 3))
var num: number;
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 11, 3))
var strOrNum: string | number;
>strOrNum : Symbol(strOrNum, Decl(typeGuardOfFormIsType.ts, 12, 3))
function isC1(x: any): x is C1 {
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsType.ts, 12, 30))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 14, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 14, 14))
>C1 : Symbol(C1, Decl(typeGuardOfFormIsType.ts, 0, 0))
return true;
}
function isC2(x: any): x is C2 {
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 16, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 18, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 18, 14))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))
return true;
}
function isD1(x: any): x is D1 {
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 22, 14))
>x : Symbol(x, Decl(typeGuardOfFormIsType.ts, 22, 14))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 6, 1))
return true;
}
var c1Orc2: C1 | C2;
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>C1 : Symbol(C1, Decl(typeGuardOfFormIsType.ts, 0, 0))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))
str = isC1(c1Orc2) && c1Orc2.p1; // C1
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsType.ts, 12, 30))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>c1Orc2.p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
num = isC2(c1Orc2) && c1Orc2.p2; // C2
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 11, 3))
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 16, 1))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>c1Orc2.p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 4, 10))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 4, 10))
str = isD1(c1Orc2) && c1Orc2.p1; // D1
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>c1Orc2.p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
num = isD1(c1Orc2) && c1Orc2.p3; // D1
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 11, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>c1Orc2.p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 7, 21))
>c1Orc2 : Symbol(c1Orc2, Decl(typeGuardOfFormIsType.ts, 26, 3))
>p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 7, 21))
var c2Ord1: C2 | D1;
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 6, 1))
num = isC2(c2Ord1) && c2Ord1.p2; // C2
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 11, 3))
>isC2 : Symbol(isC2, Decl(typeGuardOfFormIsType.ts, 16, 1))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>c2Ord1.p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 4, 10))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>p2 : Symbol(C2.p2, Decl(typeGuardOfFormIsType.ts, 4, 10))
num = isD1(c2Ord1) && c2Ord1.p3; // D1
>num : Symbol(num, Decl(typeGuardOfFormIsType.ts, 11, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>c2Ord1.p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 7, 21))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>p3 : Symbol(D1.p3, Decl(typeGuardOfFormIsType.ts, 7, 21))
str = isD1(c2Ord1) && c2Ord1.p1; // D1
>str : Symbol(str, Decl(typeGuardOfFormIsType.ts, 10, 3))
>isD1 : Symbol(isD1, Decl(typeGuardOfFormIsType.ts, 20, 1))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>c2Ord1.p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>p1 : Symbol(C1.p1, Decl(typeGuardOfFormIsType.ts, 1, 10))
var r2: C2 | D1 = isC1(c2Ord1) && c2Ord1; // C2 | D1
>r2 : Symbol(r2, Decl(typeGuardOfFormIsType.ts, 36, 3))
>C2 : Symbol(C2, Decl(typeGuardOfFormIsType.ts, 3, 1))
>D1 : Symbol(D1, Decl(typeGuardOfFormIsType.ts, 6, 1))
>isC1 : Symbol(isC1, Decl(typeGuardOfFormIsType.ts, 12, 30))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))
>c2Ord1 : Symbol(c2Ord1, Decl(typeGuardOfFormIsType.ts, 32, 3))