2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/subtypingTransitivity.ts ===
|
|
|
|
class B {
|
2015-04-13 23:01:57 +02:00
|
|
|
>B : B, Symbol(B, Decl(subtypingTransitivity.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
x: Object;
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : Object, Symbol(x, Decl(subtypingTransitivity.ts, 0, 9))
|
|
|
|
>Object : Object, Symbol(Object, Decl(lib.d.ts, 92, 1), Decl(lib.d.ts, 223, 11))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
class D extends B {
|
2015-04-13 23:01:57 +02:00
|
|
|
>D : D, Symbol(D, Decl(subtypingTransitivity.ts, 2, 1))
|
|
|
|
>B : B, Symbol(B, Decl(subtypingTransitivity.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
public x: string;
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : string, Symbol(x, Decl(subtypingTransitivity.ts, 4, 19))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
class D2 extends B {
|
2015-04-13 23:01:57 +02:00
|
|
|
>D2 : D2, Symbol(D2, Decl(subtypingTransitivity.ts, 6, 1))
|
|
|
|
>B : B, Symbol(B, Decl(subtypingTransitivity.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
public x: number;
|
2015-04-13 23:01:57 +02:00
|
|
|
>x : number, Symbol(x, Decl(subtypingTransitivity.ts, 7, 20))
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var b: B;
|
2015-04-13 23:01:57 +02:00
|
|
|
>b : B, Symbol(b, Decl(subtypingTransitivity.ts, 11, 3))
|
|
|
|
>B : B, Symbol(B, Decl(subtypingTransitivity.ts, 0, 0))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var d: D;
|
2015-04-13 23:01:57 +02:00
|
|
|
>d : D, Symbol(d, Decl(subtypingTransitivity.ts, 12, 3))
|
|
|
|
>D : D, Symbol(D, Decl(subtypingTransitivity.ts, 2, 1))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var d2: D2;
|
2015-04-13 23:01:57 +02:00
|
|
|
>d2 : D2, Symbol(d2, Decl(subtypingTransitivity.ts, 13, 3))
|
|
|
|
>D2 : D2, Symbol(D2, Decl(subtypingTransitivity.ts, 6, 1))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
d.x = '';
|
|
|
|
>d.x = '' : string
|
2015-04-13 23:01:57 +02:00
|
|
|
>d.x : string, Symbol(D.x, Decl(subtypingTransitivity.ts, 4, 19))
|
|
|
|
>d : D, Symbol(d, Decl(subtypingTransitivity.ts, 12, 3))
|
|
|
|
>x : string, Symbol(D.x, Decl(subtypingTransitivity.ts, 4, 19))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
b = d;
|
|
|
|
>b = d : D
|
2015-04-13 23:01:57 +02:00
|
|
|
>b : B, Symbol(b, Decl(subtypingTransitivity.ts, 11, 3))
|
|
|
|
>d : D, Symbol(d, Decl(subtypingTransitivity.ts, 12, 3))
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
b.x = 1; // assigned number to string
|
|
|
|
>b.x = 1 : number
|
2015-04-13 23:01:57 +02:00
|
|
|
>b.x : Object, Symbol(B.x, Decl(subtypingTransitivity.ts, 0, 9))
|
|
|
|
>b : B, Symbol(b, Decl(subtypingTransitivity.ts, 11, 3))
|
|
|
|
>x : Object, Symbol(B.x, Decl(subtypingTransitivity.ts, 0, 9))
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|