|
| 1 | +=== tests/cases/conformance/types/intersection/intersectionOfUnionOfUnitTypes.ts === |
| 2 | +// @strict |
| 3 | + |
| 4 | +const enum E { A, B, C, D, E, F } |
| 5 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 6 | +>A : Symbol(E.A, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 14)) |
| 7 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 8 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 9 | +>D : Symbol(E.D, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 23)) |
| 10 | +>E : Symbol(E.E, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 26)) |
| 11 | +>F : Symbol(E.F, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 29)) |
| 12 | + |
| 13 | +let x0: ('a' | 'b' | 'c') & ('a' | 'b' | 'c'); // 'a' | 'b' | 'c' |
| 14 | +>x0 : Symbol(x0, Decl(intersectionOfUnionOfUnitTypes.ts, 4, 3)) |
| 15 | + |
| 16 | +let x1: ('a' | 'b' | 'c') & ('b' | 'c' | 'd'); // 'b' | 'c' |
| 17 | +>x1 : Symbol(x1, Decl(intersectionOfUnionOfUnitTypes.ts, 5, 3)) |
| 18 | + |
| 19 | +let x2: ('a' | 'b' | 'c') & ('c' | 'd' | 'e'); // 'c' |
| 20 | +>x2 : Symbol(x2, Decl(intersectionOfUnionOfUnitTypes.ts, 6, 3)) |
| 21 | + |
| 22 | +let x3: ('a' | 'b' | 'c') & ('d' | 'e' | 'f'); // never |
| 23 | +>x3 : Symbol(x3, Decl(intersectionOfUnionOfUnitTypes.ts, 7, 3)) |
| 24 | + |
| 25 | +let x4: ('a' | 'b' | 'c') & ('b' | 'c' | 'd') & ('c' | 'd' | 'e'); // 'c' |
| 26 | +>x4 : Symbol(x4, Decl(intersectionOfUnionOfUnitTypes.ts, 8, 3)) |
| 27 | + |
| 28 | +let x5: ('a' | 'b' | 'c') & ('b' | 'c' | 'd') & ('c' | 'd' | 'e') & ('d' | 'e' | 'f'); // never |
| 29 | +>x5 : Symbol(x5, Decl(intersectionOfUnionOfUnitTypes.ts, 9, 3)) |
| 30 | + |
| 31 | +let y0: (0 | 1 | 2) & (0 | 1 | 2); // 0 | 1 | 2 |
| 32 | +>y0 : Symbol(y0, Decl(intersectionOfUnionOfUnitTypes.ts, 11, 3)) |
| 33 | + |
| 34 | +let y1: (0 | 1 | 2) & (1 | 2 | 3); // 1 | 2 |
| 35 | +>y1 : Symbol(y1, Decl(intersectionOfUnionOfUnitTypes.ts, 12, 3)) |
| 36 | + |
| 37 | +let y2: (0 | 1 | 2) & (2 | 3 | 4); // 2 |
| 38 | +>y2 : Symbol(y2, Decl(intersectionOfUnionOfUnitTypes.ts, 13, 3)) |
| 39 | + |
| 40 | +let y3: (0 | 1 | 2) & (3 | 4 | 5); // never |
| 41 | +>y3 : Symbol(y3, Decl(intersectionOfUnionOfUnitTypes.ts, 14, 3)) |
| 42 | + |
| 43 | +let y4: (0 | 1 | 2) & (1 | 2 | 3) & (2 | 3 | 4); // 2 |
| 44 | +>y4 : Symbol(y4, Decl(intersectionOfUnionOfUnitTypes.ts, 15, 3)) |
| 45 | + |
| 46 | +let y5: (0 | 1 | 2) & (1 | 2 | 3) & (2 | 3 | 4) & (3 | 4 | 5); // never |
| 47 | +>y5 : Symbol(y5, Decl(intersectionOfUnionOfUnitTypes.ts, 16, 3)) |
| 48 | + |
| 49 | +let z0: (E.A | E.B | E.C) & (E.A | E.B | E.C); // E.A | E.B | E.C |
| 50 | +>z0 : Symbol(z0, Decl(intersectionOfUnionOfUnitTypes.ts, 18, 3)) |
| 51 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 52 | +>A : Symbol(E.A, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 14)) |
| 53 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 54 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 55 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 56 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 57 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 58 | +>A : Symbol(E.A, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 14)) |
| 59 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 60 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 61 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 62 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 63 | + |
| 64 | +let z1: (E.A | E.B | E.C) & (E.B | E.C | E.D); // E.B | E.C |
| 65 | +>z1 : Symbol(z1, Decl(intersectionOfUnionOfUnitTypes.ts, 19, 3)) |
| 66 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 67 | +>A : Symbol(E.A, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 14)) |
| 68 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 69 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 70 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 71 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 72 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 73 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 74 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 75 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 76 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 77 | +>D : Symbol(E.D, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 23)) |
| 78 | + |
| 79 | +let z2: (E.A | E.B | E.C) & (E.C | E.D | E.E); // E.C |
| 80 | +>z2 : Symbol(z2, Decl(intersectionOfUnionOfUnitTypes.ts, 20, 3)) |
| 81 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 82 | +>A : Symbol(E.A, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 14)) |
| 83 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 84 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 85 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 86 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 87 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 88 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 89 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 90 | +>D : Symbol(E.D, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 23)) |
| 91 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 92 | +>E : Symbol(E.E, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 26)) |
| 93 | + |
| 94 | +let z3: (E.A | E.B | E.C) & (E.D | E.E | E.F); // never |
| 95 | +>z3 : Symbol(z3, Decl(intersectionOfUnionOfUnitTypes.ts, 21, 3)) |
| 96 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 97 | +>A : Symbol(E.A, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 14)) |
| 98 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 99 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 100 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 101 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 102 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 103 | +>D : Symbol(E.D, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 23)) |
| 104 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 105 | +>E : Symbol(E.E, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 26)) |
| 106 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 107 | +>F : Symbol(E.F, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 29)) |
| 108 | + |
| 109 | +let z4: (E.A | E.B | E.C) & (E.B | E.C | E.D) & (E.C | E.D | E.E); // E.C |
| 110 | +>z4 : Symbol(z4, Decl(intersectionOfUnionOfUnitTypes.ts, 22, 3)) |
| 111 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 112 | +>A : Symbol(E.A, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 14)) |
| 113 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 114 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 115 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 116 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 117 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 118 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 119 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 120 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 121 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 122 | +>D : Symbol(E.D, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 23)) |
| 123 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 124 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 125 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 126 | +>D : Symbol(E.D, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 23)) |
| 127 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 128 | +>E : Symbol(E.E, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 26)) |
| 129 | + |
| 130 | +let z5: (E.A | E.B | E.C) & (E.B | E.C | E.D) & (E.C | E.D | E.E) & (E.D | E.E | E.F); // never |
| 131 | +>z5 : Symbol(z5, Decl(intersectionOfUnionOfUnitTypes.ts, 23, 3)) |
| 132 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 133 | +>A : Symbol(E.A, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 14)) |
| 134 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 135 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 136 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 137 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 138 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 139 | +>B : Symbol(E.B, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 17)) |
| 140 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 141 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 142 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 143 | +>D : Symbol(E.D, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 23)) |
| 144 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 145 | +>C : Symbol(E.C, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 20)) |
| 146 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 147 | +>D : Symbol(E.D, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 23)) |
| 148 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 149 | +>E : Symbol(E.E, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 26)) |
| 150 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 151 | +>D : Symbol(E.D, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 23)) |
| 152 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 153 | +>E : Symbol(E.E, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 26)) |
| 154 | +>E : Symbol(E, Decl(intersectionOfUnionOfUnitTypes.ts, 0, 0)) |
| 155 | +>F : Symbol(E.F, Decl(intersectionOfUnionOfUnitTypes.ts, 2, 29)) |
| 156 | + |
0 commit comments