|
| 1 | +=== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithDiscriminatedUnion.ts === |
| 2 | +// see 'typeRelatedToDiscriminatedType' in checker.ts: |
| 3 | + |
| 4 | +// IteratorResult |
| 5 | +namespace Example1 { |
| 6 | +>Example1 : Symbol(Example1, Decl(assignmentCompatWithDiscriminatedUnion.ts, 0, 0)) |
| 7 | + |
| 8 | + type S = { done: boolean, value: number }; |
| 9 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 3, 20)) |
| 10 | +>done : Symbol(done, Decl(assignmentCompatWithDiscriminatedUnion.ts, 4, 14)) |
| 11 | +>value : Symbol(value, Decl(assignmentCompatWithDiscriminatedUnion.ts, 4, 29)) |
| 12 | + |
| 13 | + type T = |
| 14 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 4, 46)) |
| 15 | + |
| 16 | + | { done: true, value: number } // T0 |
| 17 | +>done : Symbol(done, Decl(assignmentCompatWithDiscriminatedUnion.ts, 6, 11)) |
| 18 | +>value : Symbol(value, Decl(assignmentCompatWithDiscriminatedUnion.ts, 6, 23)) |
| 19 | + |
| 20 | + | { done: false, value: number }; // T1 |
| 21 | +>done : Symbol(done, Decl(assignmentCompatWithDiscriminatedUnion.ts, 7, 11)) |
| 22 | +>value : Symbol(value, Decl(assignmentCompatWithDiscriminatedUnion.ts, 7, 24)) |
| 23 | + |
| 24 | + declare let s: S; |
| 25 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 9, 15)) |
| 26 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 3, 20)) |
| 27 | + |
| 28 | + declare let t: T; |
| 29 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 10, 15)) |
| 30 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 4, 46)) |
| 31 | + |
| 32 | + // S is assignable to T0 when S["done"] is true |
| 33 | + // S is assignable to T1 when S["done"] is false |
| 34 | + t = s; |
| 35 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 10, 15)) |
| 36 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 9, 15)) |
| 37 | +} |
| 38 | + |
| 39 | +// Dropping constituents of T |
| 40 | +namespace Example2 { |
| 41 | +>Example2 : Symbol(Example2, Decl(assignmentCompatWithDiscriminatedUnion.ts, 15, 1)) |
| 42 | + |
| 43 | + type S = { a: 0 | 2, b: 4 }; |
| 44 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 18, 20)) |
| 45 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 19, 14)) |
| 46 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 19, 24)) |
| 47 | + |
| 48 | + type T = { a: 0, b: 1 | 4 } // T0 |
| 49 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 19, 32)) |
| 50 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 20, 14)) |
| 51 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 20, 20)) |
| 52 | + |
| 53 | + | { a: 1, b: 2 } // T1 |
| 54 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 21, 14)) |
| 55 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 21, 20)) |
| 56 | + |
| 57 | + | { a: 2, b: 3 | 4 }; // T2 |
| 58 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 22, 14)) |
| 59 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 22, 20)) |
| 60 | + |
| 61 | + declare let s: S; |
| 62 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 23, 15)) |
| 63 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 18, 20)) |
| 64 | + |
| 65 | + declare let t: T; |
| 66 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 24, 15)) |
| 67 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 19, 32)) |
| 68 | + |
| 69 | + // S is assignable to T0 when S["a"] is 0 |
| 70 | + // S is assignable to T2 when S["a"] is 2 |
| 71 | + t = s; |
| 72 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 24, 15)) |
| 73 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 23, 15)) |
| 74 | +} |
| 75 | + |
| 76 | +// Unmatched discriminants |
| 77 | +namespace Example3 { |
| 78 | +>Example3 : Symbol(Example3, Decl(assignmentCompatWithDiscriminatedUnion.ts, 29, 1)) |
| 79 | + |
| 80 | + type S = { a: 0 | 2, b: 4 }; |
| 81 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 32, 20)) |
| 82 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 33, 14)) |
| 83 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 33, 24)) |
| 84 | + |
| 85 | + type T = { a: 0, b: 1 | 4 } // T0 |
| 86 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 33, 32)) |
| 87 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 34, 14)) |
| 88 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 34, 20)) |
| 89 | + |
| 90 | + | { a: 1, b: 2 | 4 } // T1 |
| 91 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 35, 14)) |
| 92 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 35, 20)) |
| 93 | + |
| 94 | + | { a: 2, b: 3 }; // T2 |
| 95 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 36, 14)) |
| 96 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 36, 20)) |
| 97 | + |
| 98 | + declare let s: S; |
| 99 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 37, 15)) |
| 100 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 32, 20)) |
| 101 | + |
| 102 | + declare let t: T; |
| 103 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 38, 15)) |
| 104 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 33, 32)) |
| 105 | + |
| 106 | + // S is assignable to T0 when S["a"] is 0 |
| 107 | + // S is *not* assignable to T1 when S["b"] is 4 |
| 108 | + // S is *not* assignable to T2 when S["a"] is 2 |
| 109 | + t = s; |
| 110 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 38, 15)) |
| 111 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 37, 15)) |
| 112 | +} |
| 113 | + |
| 114 | +// Unmatched non-discriminants |
| 115 | +namespace Example4 { |
| 116 | +>Example4 : Symbol(Example4, Decl(assignmentCompatWithDiscriminatedUnion.ts, 44, 1)) |
| 117 | + |
| 118 | + type S = { a: 0 | 2, b: 4 }; |
| 119 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 47, 20)) |
| 120 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 48, 14)) |
| 121 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 48, 24)) |
| 122 | + |
| 123 | + type T = { a: 0, b: 1 | 4 } // T0 |
| 124 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 48, 32)) |
| 125 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 49, 14)) |
| 126 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 49, 20)) |
| 127 | + |
| 128 | + | { a: 1, b: 2 } // T1 |
| 129 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 50, 14)) |
| 130 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 50, 20)) |
| 131 | + |
| 132 | + | { a: 2, b: 3 | 4, c: string }; // T2 |
| 133 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 51, 14)) |
| 134 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 51, 20)) |
| 135 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 51, 34)) |
| 136 | + |
| 137 | + declare let s: S; |
| 138 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 52, 15)) |
| 139 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 47, 20)) |
| 140 | + |
| 141 | + declare let t: T; |
| 142 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 53, 15)) |
| 143 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 48, 32)) |
| 144 | + |
| 145 | + // S is assignable to T0 when S["a"] is 0 |
| 146 | + // S is *not* assignable to T2 when S["a"] is 2 as S is missing "c" |
| 147 | + t = s; |
| 148 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 53, 15)) |
| 149 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 52, 15)) |
| 150 | +} |
| 151 | + |
| 152 | +// Maximum discriminant combinations |
| 153 | +namespace Example5 { |
| 154 | +>Example5 : Symbol(Example5, Decl(assignmentCompatWithDiscriminatedUnion.ts, 58, 1)) |
| 155 | + |
| 156 | + // NOTE: MAX_DISCRIMINANT_COMBINATIONS is currently 25 |
| 157 | + // 3 discriminant properties with 3 types a piece |
| 158 | + // is 27 possible combinations. |
| 159 | + type N = 0 | 1 | 2; |
| 160 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 161 | + |
| 162 | + type S = { a: N, b: N, c: N }; |
| 163 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 65, 23)) |
| 164 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 14)) |
| 165 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 166 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 20)) |
| 167 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 168 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 26)) |
| 169 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 170 | + |
| 171 | + type T = { a: 0, b: N, c: N } |
| 172 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 34)) |
| 173 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 67, 14)) |
| 174 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 67, 20)) |
| 175 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 176 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 67, 26)) |
| 177 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 178 | + |
| 179 | + | { a: 1, b: N, c: N } |
| 180 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 68, 14)) |
| 181 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 68, 20)) |
| 182 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 183 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 68, 26)) |
| 184 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 185 | + |
| 186 | + | { a: 2, b: N, c: N } |
| 187 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 69, 14)) |
| 188 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 69, 20)) |
| 189 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 190 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 69, 26)) |
| 191 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 192 | + |
| 193 | + | { a: N, b: 0, c: N } |
| 194 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 70, 14)) |
| 195 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 196 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 70, 20)) |
| 197 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 70, 26)) |
| 198 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 199 | + |
| 200 | + | { a: N, b: 1, c: N } |
| 201 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 71, 14)) |
| 202 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 203 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 71, 20)) |
| 204 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 71, 26)) |
| 205 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 206 | + |
| 207 | + | { a: N, b: 2, c: N } |
| 208 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 72, 14)) |
| 209 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 210 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 72, 20)) |
| 211 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 72, 26)) |
| 212 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 213 | + |
| 214 | + | { a: N, b: N, c: 0 } |
| 215 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 73, 14)) |
| 216 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 217 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 73, 20)) |
| 218 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 219 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 73, 26)) |
| 220 | + |
| 221 | + | { a: N, b: N, c: 1 } |
| 222 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 74, 14)) |
| 223 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 224 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 74, 20)) |
| 225 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 226 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 74, 26)) |
| 227 | + |
| 228 | + | { a: N, b: N, c: 2 }; |
| 229 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 75, 14)) |
| 230 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 231 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 75, 20)) |
| 232 | +>N : Symbol(N, Decl(assignmentCompatWithDiscriminatedUnion.ts, 61, 20)) |
| 233 | +>c : Symbol(c, Decl(assignmentCompatWithDiscriminatedUnion.ts, 75, 26)) |
| 234 | + |
| 235 | + declare let s: S; |
| 236 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 76, 15)) |
| 237 | +>S : Symbol(S, Decl(assignmentCompatWithDiscriminatedUnion.ts, 65, 23)) |
| 238 | + |
| 239 | + declare let t: T; |
| 240 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 77, 15)) |
| 241 | +>T : Symbol(T, Decl(assignmentCompatWithDiscriminatedUnion.ts, 66, 34)) |
| 242 | + |
| 243 | + // S *should* be assignable but the number of |
| 244 | + // combinations is too complex. |
| 245 | + t = s; |
| 246 | +>t : Symbol(t, Decl(assignmentCompatWithDiscriminatedUnion.ts, 77, 15)) |
| 247 | +>s : Symbol(s, Decl(assignmentCompatWithDiscriminatedUnion.ts, 76, 15)) |
| 248 | +} |
| 249 | + |
| 250 | +// https://github.com/Microsoft/TypeScript/issues/14865 |
| 251 | +namespace Example6 { |
| 252 | +>Example6 : Symbol(Example6, Decl(assignmentCompatWithDiscriminatedUnion.ts, 82, 1)) |
| 253 | + |
| 254 | + type Style1 = { |
| 255 | +>Style1 : Symbol(Style1, Decl(assignmentCompatWithDiscriminatedUnion.ts, 85, 20)) |
| 256 | + |
| 257 | + type: "A"; |
| 258 | +>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 86, 19)) |
| 259 | + |
| 260 | + data: string; |
| 261 | +>data : Symbol(data, Decl(assignmentCompatWithDiscriminatedUnion.ts, 87, 18)) |
| 262 | + |
| 263 | + } | { |
| 264 | + type: "B"; |
| 265 | +>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 89, 9)) |
| 266 | + |
| 267 | + data: string; |
| 268 | +>data : Symbol(data, Decl(assignmentCompatWithDiscriminatedUnion.ts, 90, 18)) |
| 269 | + |
| 270 | + }; |
| 271 | + |
| 272 | + type Style2 = { |
| 273 | +>Style2 : Symbol(Style2, Decl(assignmentCompatWithDiscriminatedUnion.ts, 92, 6)) |
| 274 | + |
| 275 | + type: "A" | "B"; |
| 276 | +>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 94, 19)) |
| 277 | + |
| 278 | + data: string; |
| 279 | +>data : Symbol(data, Decl(assignmentCompatWithDiscriminatedUnion.ts, 95, 24)) |
| 280 | + } |
| 281 | + |
| 282 | + const a: Style2 = { type: "A", data: "whatevs" }; |
| 283 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 99, 9)) |
| 284 | +>Style2 : Symbol(Style2, Decl(assignmentCompatWithDiscriminatedUnion.ts, 92, 6)) |
| 285 | +>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 99, 23)) |
| 286 | +>data : Symbol(data, Decl(assignmentCompatWithDiscriminatedUnion.ts, 99, 34)) |
| 287 | + |
| 288 | + let b: Style1; |
| 289 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 100, 7)) |
| 290 | +>Style1 : Symbol(Style1, Decl(assignmentCompatWithDiscriminatedUnion.ts, 85, 20)) |
| 291 | + |
| 292 | + a.type; // "A" | "B" |
| 293 | +>a.type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 94, 19)) |
| 294 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 99, 9)) |
| 295 | +>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 94, 19)) |
| 296 | + |
| 297 | + b.type; // "A" | "B" |
| 298 | +>b.type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 86, 19), Decl(assignmentCompatWithDiscriminatedUnion.ts, 89, 9)) |
| 299 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 100, 7)) |
| 300 | +>type : Symbol(type, Decl(assignmentCompatWithDiscriminatedUnion.ts, 86, 19), Decl(assignmentCompatWithDiscriminatedUnion.ts, 89, 9)) |
| 301 | + |
| 302 | + b = a; // should be assignable |
| 303 | +>b : Symbol(b, Decl(assignmentCompatWithDiscriminatedUnion.ts, 100, 7)) |
| 304 | +>a : Symbol(a, Decl(assignmentCompatWithDiscriminatedUnion.ts, 99, 9)) |
| 305 | +} |
0 commit comments