|
| 1 | +//// [tests/cases/compiler/elaborationForSameRelationshipOnDifferentLocations.ts] //// |
| 2 | + |
| 3 | +=== elaborationForSameRelationshipOnDifferentLocations.ts === |
| 4 | +// https://github.com/microsoft/TypeScript/issues/3276 |
| 5 | + |
| 6 | +class GenericThingamabob<T> { |
| 7 | +>GenericThingamabob : Symbol(GenericThingamabob, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 0, 0)) |
| 8 | +>T : Symbol(T, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 2, 25)) |
| 9 | + |
| 10 | + constructor(private entity: T) {} |
| 11 | +>entity : Symbol(GenericThingamabob.entity, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 3, 16)) |
| 12 | +>T : Symbol(T, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 2, 25)) |
| 13 | + |
| 14 | + add(item: T) { } |
| 15 | +>add : Symbol(GenericThingamabob.add, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 3, 37)) |
| 16 | +>item : Symbol(item, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 4, 8)) |
| 17 | +>T : Symbol(T, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 2, 25)) |
| 18 | +} |
| 19 | + |
| 20 | +class CouponInfo { |
| 21 | +>CouponInfo : Symbol(CouponInfo, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 5, 1)) |
| 22 | + |
| 23 | + private couponTag: {}; |
| 24 | +>couponTag : Symbol(CouponInfo.couponTag, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 7, 18)) |
| 25 | +} |
| 26 | + |
| 27 | +class Snake { |
| 28 | +>Snake : Symbol(Snake, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 9, 1)) |
| 29 | + |
| 30 | + private snakeTag: {}; |
| 31 | +>snakeTag : Symbol(Snake.snakeTag, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 11, 13)) |
| 32 | +} |
| 33 | + |
| 34 | +var blah = new GenericThingamabob(new CouponInfo()); |
| 35 | +>blah : Symbol(blah, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 15, 3)) |
| 36 | +>GenericThingamabob : Symbol(GenericThingamabob, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 0, 0)) |
| 37 | +>CouponInfo : Symbol(CouponInfo, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 5, 1)) |
| 38 | + |
| 39 | +blah.add(new Snake()); |
| 40 | +>blah.add : Symbol(GenericThingamabob.add, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 3, 37)) |
| 41 | +>blah : Symbol(blah, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 15, 3)) |
| 42 | +>add : Symbol(GenericThingamabob.add, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 3, 37)) |
| 43 | +>Snake : Symbol(Snake, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 9, 1)) |
| 44 | + |
| 45 | +var x: CouponInfo = new Snake(); |
| 46 | +>x : Symbol(x, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 18, 3)) |
| 47 | +>CouponInfo : Symbol(CouponInfo, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 5, 1)) |
| 48 | +>Snake : Symbol(Snake, Decl(elaborationForSameRelationshipOnDifferentLocations.ts, 9, 1)) |
| 49 | + |
0 commit comments