|
| 1 | +//// [tests/cases/compiler/discriminateWithDivergentAccessors1.ts] //// |
| 2 | + |
| 3 | +=== discriminateWithDivergentAccessors1.ts === |
| 4 | +type WeirdoBox<T> = |
| 5 | +>WeirdoBox : Symbol(WeirdoBox, Decl(discriminateWithDivergentAccessors1.ts, 0, 0)) |
| 6 | +>T : Symbol(T, Decl(discriminateWithDivergentAccessors1.ts, 0, 15)) |
| 7 | + |
| 8 | + | { get done(): false; set done(v: T | null) } |
| 9 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 1, 5), Decl(discriminateWithDivergentAccessors1.ts, 1, 24)) |
| 10 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 1, 5), Decl(discriminateWithDivergentAccessors1.ts, 1, 24)) |
| 11 | +>v : Symbol(v, Decl(discriminateWithDivergentAccessors1.ts, 1, 34)) |
| 12 | +>T : Symbol(T, Decl(discriminateWithDivergentAccessors1.ts, 0, 15)) |
| 13 | + |
| 14 | + | { get done(): true; set done(v: T | null); value: T }; |
| 15 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 2, 5), Decl(discriminateWithDivergentAccessors1.ts, 2, 23)) |
| 16 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 2, 5), Decl(discriminateWithDivergentAccessors1.ts, 2, 23)) |
| 17 | +>v : Symbol(v, Decl(discriminateWithDivergentAccessors1.ts, 2, 33)) |
| 18 | +>T : Symbol(T, Decl(discriminateWithDivergentAccessors1.ts, 0, 15)) |
| 19 | +>value : Symbol(value, Decl(discriminateWithDivergentAccessors1.ts, 2, 46)) |
| 20 | +>T : Symbol(T, Decl(discriminateWithDivergentAccessors1.ts, 0, 15)) |
| 21 | + |
| 22 | +declare const weirdoBox: WeirdoBox<number>; |
| 23 | +>weirdoBox : Symbol(weirdoBox, Decl(discriminateWithDivergentAccessors1.ts, 4, 13)) |
| 24 | +>WeirdoBox : Symbol(WeirdoBox, Decl(discriminateWithDivergentAccessors1.ts, 0, 0)) |
| 25 | + |
| 26 | +if (weirdoBox.done) { |
| 27 | +>weirdoBox.done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 1, 5), Decl(discriminateWithDivergentAccessors1.ts, 1, 24), Decl(discriminateWithDivergentAccessors1.ts, 2, 5), Decl(discriminateWithDivergentAccessors1.ts, 2, 23)) |
| 28 | +>weirdoBox : Symbol(weirdoBox, Decl(discriminateWithDivergentAccessors1.ts, 4, 13)) |
| 29 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 1, 5), Decl(discriminateWithDivergentAccessors1.ts, 1, 24), Decl(discriminateWithDivergentAccessors1.ts, 2, 5), Decl(discriminateWithDivergentAccessors1.ts, 2, 23)) |
| 30 | + |
| 31 | + weirdoBox.value; |
| 32 | +>weirdoBox.value : Symbol(value, Decl(discriminateWithDivergentAccessors1.ts, 2, 46)) |
| 33 | +>weirdoBox : Symbol(weirdoBox, Decl(discriminateWithDivergentAccessors1.ts, 4, 13)) |
| 34 | +>value : Symbol(value, Decl(discriminateWithDivergentAccessors1.ts, 2, 46)) |
| 35 | +} |
| 36 | + |
| 37 | +type WeirdoBox2<T> = |
| 38 | +>WeirdoBox2 : Symbol(WeirdoBox2, Decl(discriminateWithDivergentAccessors1.ts, 8, 1)) |
| 39 | +>T : Symbol(T, Decl(discriminateWithDivergentAccessors1.ts, 10, 16)) |
| 40 | + |
| 41 | + | { get done(): false; set done(v: T | null) } |
| 42 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 11, 5), Decl(discriminateWithDivergentAccessors1.ts, 11, 24)) |
| 43 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 11, 5), Decl(discriminateWithDivergentAccessors1.ts, 11, 24)) |
| 44 | +>v : Symbol(v, Decl(discriminateWithDivergentAccessors1.ts, 11, 34)) |
| 45 | +>T : Symbol(T, Decl(discriminateWithDivergentAccessors1.ts, 10, 16)) |
| 46 | + |
| 47 | + | { get done(): true; set done(v: T | null); value: T } |
| 48 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 12, 5), Decl(discriminateWithDivergentAccessors1.ts, 12, 23)) |
| 49 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 12, 5), Decl(discriminateWithDivergentAccessors1.ts, 12, 23)) |
| 50 | +>v : Symbol(v, Decl(discriminateWithDivergentAccessors1.ts, 12, 33)) |
| 51 | +>T : Symbol(T, Decl(discriminateWithDivergentAccessors1.ts, 10, 16)) |
| 52 | +>value : Symbol(value, Decl(discriminateWithDivergentAccessors1.ts, 12, 46)) |
| 53 | +>T : Symbol(T, Decl(discriminateWithDivergentAccessors1.ts, 10, 16)) |
| 54 | + |
| 55 | + | { get done(): true; set done(v: T | null | undefined); value: number }; |
| 56 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 13, 5), Decl(discriminateWithDivergentAccessors1.ts, 13, 23)) |
| 57 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 13, 5), Decl(discriminateWithDivergentAccessors1.ts, 13, 23)) |
| 58 | +>v : Symbol(v, Decl(discriminateWithDivergentAccessors1.ts, 13, 33)) |
| 59 | +>T : Symbol(T, Decl(discriminateWithDivergentAccessors1.ts, 10, 16)) |
| 60 | +>value : Symbol(value, Decl(discriminateWithDivergentAccessors1.ts, 13, 58)) |
| 61 | + |
| 62 | +declare const weirdoBox2: WeirdoBox2<string>; |
| 63 | +>weirdoBox2 : Symbol(weirdoBox2, Decl(discriminateWithDivergentAccessors1.ts, 15, 13)) |
| 64 | +>WeirdoBox2 : Symbol(WeirdoBox2, Decl(discriminateWithDivergentAccessors1.ts, 8, 1)) |
| 65 | + |
| 66 | +if (weirdoBox2.done) { |
| 67 | +>weirdoBox2.done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 11, 5), Decl(discriminateWithDivergentAccessors1.ts, 11, 24), Decl(discriminateWithDivergentAccessors1.ts, 12, 5), Decl(discriminateWithDivergentAccessors1.ts, 12, 23), Decl(discriminateWithDivergentAccessors1.ts, 13, 5) ... and 1 more) |
| 68 | +>weirdoBox2 : Symbol(weirdoBox2, Decl(discriminateWithDivergentAccessors1.ts, 15, 13)) |
| 69 | +>done : Symbol(done, Decl(discriminateWithDivergentAccessors1.ts, 11, 5), Decl(discriminateWithDivergentAccessors1.ts, 11, 24), Decl(discriminateWithDivergentAccessors1.ts, 12, 5), Decl(discriminateWithDivergentAccessors1.ts, 12, 23), Decl(discriminateWithDivergentAccessors1.ts, 13, 5) ... and 1 more) |
| 70 | + |
| 71 | + weirdoBox2.value; |
| 72 | +>weirdoBox2.value : Symbol(value, Decl(discriminateWithDivergentAccessors1.ts, 12, 46), Decl(discriminateWithDivergentAccessors1.ts, 13, 58)) |
| 73 | +>weirdoBox2 : Symbol(weirdoBox2, Decl(discriminateWithDivergentAccessors1.ts, 15, 13)) |
| 74 | +>value : Symbol(value, Decl(discriminateWithDivergentAccessors1.ts, 12, 46), Decl(discriminateWithDivergentAccessors1.ts, 13, 58)) |
| 75 | +} |
| 76 | + |
0 commit comments