1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
|
=== tests/cases/conformance/types/intersection/intersectionAndUnionTypes.ts ===
interface A { a: string }
>A : Symbol(A, Decl(intersectionAndUnionTypes.ts, 0, 0))
>a : Symbol(A.a, Decl(intersectionAndUnionTypes.ts, 0, 13))
interface B { b: string }
>B : Symbol(B, Decl(intersectionAndUnionTypes.ts, 0, 25))
>b : Symbol(B.b, Decl(intersectionAndUnionTypes.ts, 1, 13))
interface C { c: string }
>C : Symbol(C, Decl(intersectionAndUnionTypes.ts, 1, 25))
>c : Symbol(C.c, Decl(intersectionAndUnionTypes.ts, 2, 13))
interface D { d: string }
>D : Symbol(D, Decl(intersectionAndUnionTypes.ts, 2, 25))
>d : Symbol(D.d, Decl(intersectionAndUnionTypes.ts, 3, 13))
var a: A;
>a : Symbol(a, Decl(intersectionAndUnionTypes.ts, 5, 3))
>A : Symbol(A, Decl(intersectionAndUnionTypes.ts, 0, 0))
var b: B;
>b : Symbol(b, Decl(intersectionAndUnionTypes.ts, 6, 3))
>B : Symbol(B, Decl(intersectionAndUnionTypes.ts, 0, 25))
var c: C;
>c : Symbol(c, Decl(intersectionAndUnionTypes.ts, 7, 3))
>C : Symbol(C, Decl(intersectionAndUnionTypes.ts, 1, 25))
var d: D;
>d : Symbol(d, Decl(intersectionAndUnionTypes.ts, 8, 3))
>D : Symbol(D, Decl(intersectionAndUnionTypes.ts, 2, 25))
var anb: A & B;
>anb : Symbol(anb, Decl(intersectionAndUnionTypes.ts, 9, 3))
>A : Symbol(A, Decl(intersectionAndUnionTypes.ts, 0, 0))
>B : Symbol(B, Decl(intersectionAndUnionTypes.ts, 0, 25))
var aob: A | B;
>aob : Symbol(aob, Decl(intersectionAndUnionTypes.ts, 10, 3))
>A : Symbol(A, Decl(intersectionAndUnionTypes.ts, 0, 0))
>B : Symbol(B, Decl(intersectionAndUnionTypes.ts, 0, 25))
var cnd: C & D;
>cnd : Symbol(cnd, Decl(intersectionAndUnionTypes.ts, 11, 3))
>C : Symbol(C, Decl(intersectionAndUnionTypes.ts, 1, 25))
>D : Symbol(D, Decl(intersectionAndUnionTypes.ts, 2, 25))
var cod: C | D;
>cod : Symbol(cod, Decl(intersectionAndUnionTypes.ts, 12, 3))
>C : Symbol(C, Decl(intersectionAndUnionTypes.ts, 1, 25))
>D : Symbol(D, Decl(intersectionAndUnionTypes.ts, 2, 25))
var x: A & B | C & D;
>x : Symbol(x, Decl(intersectionAndUnionTypes.ts, 13, 3))
>A : Symbol(A, Decl(intersectionAndUnionTypes.ts, 0, 0))
>B : Symbol(B, Decl(intersectionAndUnionTypes.ts, 0, 25))
>C : Symbol(C, Decl(intersectionAndUnionTypes.ts, 1, 25))
>D : Symbol(D, Decl(intersectionAndUnionTypes.ts, 2, 25))
var y: (A | B) & (C | D);
>y : Symbol(y, Decl(intersectionAndUnionTypes.ts, 14, 3))
>A : Symbol(A, Decl(intersectionAndUnionTypes.ts, 0, 0))
>B : Symbol(B, Decl(intersectionAndUnionTypes.ts, 0, 25))
>C : Symbol(C, Decl(intersectionAndUnionTypes.ts, 1, 25))
>D : Symbol(D, Decl(intersectionAndUnionTypes.ts, 2, 25))
a = anb; // Ok
>a : Symbol(a, Decl(intersectionAndUnionTypes.ts, 5, 3))
>anb : Symbol(anb, Decl(intersectionAndUnionTypes.ts, 9, 3))
b = anb; // Ok
>b : Symbol(b, Decl(intersectionAndUnionTypes.ts, 6, 3))
>anb : Symbol(anb, Decl(intersectionAndUnionTypes.ts, 9, 3))
anb = a;
>anb : Symbol(anb, Decl(intersectionAndUnionTypes.ts, 9, 3))
>a : Symbol(a, Decl(intersectionAndUnionTypes.ts, 5, 3))
anb = b;
>anb : Symbol(anb, Decl(intersectionAndUnionTypes.ts, 9, 3))
>b : Symbol(b, Decl(intersectionAndUnionTypes.ts, 6, 3))
x = anb; // Ok
>x : Symbol(x, Decl(intersectionAndUnionTypes.ts, 13, 3))
>anb : Symbol(anb, Decl(intersectionAndUnionTypes.ts, 9, 3))
x = aob;
>x : Symbol(x, Decl(intersectionAndUnionTypes.ts, 13, 3))
>aob : Symbol(aob, Decl(intersectionAndUnionTypes.ts, 10, 3))
x = cnd; // Ok
>x : Symbol(x, Decl(intersectionAndUnionTypes.ts, 13, 3))
>cnd : Symbol(cnd, Decl(intersectionAndUnionTypes.ts, 11, 3))
x = cod;
>x : Symbol(x, Decl(intersectionAndUnionTypes.ts, 13, 3))
>cod : Symbol(cod, Decl(intersectionAndUnionTypes.ts, 12, 3))
anb = x;
>anb : Symbol(anb, Decl(intersectionAndUnionTypes.ts, 9, 3))
>x : Symbol(x, Decl(intersectionAndUnionTypes.ts, 13, 3))
aob = x;
>aob : Symbol(aob, Decl(intersectionAndUnionTypes.ts, 10, 3))
>x : Symbol(x, Decl(intersectionAndUnionTypes.ts, 13, 3))
cnd = x;
>cnd : Symbol(cnd, Decl(intersectionAndUnionTypes.ts, 11, 3))
>x : Symbol(x, Decl(intersectionAndUnionTypes.ts, 13, 3))
cod = x;
>cod : Symbol(cod, Decl(intersectionAndUnionTypes.ts, 12, 3))
>x : Symbol(x, Decl(intersectionAndUnionTypes.ts, 13, 3))
y = anb;
>y : Symbol(y, Decl(intersectionAndUnionTypes.ts, 14, 3))
>anb : Symbol(anb, Decl(intersectionAndUnionTypes.ts, 9, 3))
y = aob;
>y : Symbol(y, Decl(intersectionAndUnionTypes.ts, 14, 3))
>aob : Symbol(aob, Decl(intersectionAndUnionTypes.ts, 10, 3))
y = cnd;
>y : Symbol(y, Decl(intersectionAndUnionTypes.ts, 14, 3))
>cnd : Symbol(cnd, Decl(intersectionAndUnionTypes.ts, 11, 3))
y = cod;
>y : Symbol(y, Decl(intersectionAndUnionTypes.ts, 14, 3))
>cod : Symbol(cod, Decl(intersectionAndUnionTypes.ts, 12, 3))
anb = y;
>anb : Symbol(anb, Decl(intersectionAndUnionTypes.ts, 9, 3))
>y : Symbol(y, Decl(intersectionAndUnionTypes.ts, 14, 3))
aob = y; // Ok
>aob : Symbol(aob, Decl(intersectionAndUnionTypes.ts, 10, 3))
>y : Symbol(y, Decl(intersectionAndUnionTypes.ts, 14, 3))
cnd = y;
>cnd : Symbol(cnd, Decl(intersectionAndUnionTypes.ts, 11, 3))
>y : Symbol(y, Decl(intersectionAndUnionTypes.ts, 14, 3))
cod = y; // Ok
>cod : Symbol(cod, Decl(intersectionAndUnionTypes.ts, 12, 3))
>y : Symbol(y, Decl(intersectionAndUnionTypes.ts, 14, 3))
|