2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/accessOverriddenBaseClassMember1.ts ===
|
|
|
|
class Point {
|
|
|
|
>Point : Point
|
|
|
|
|
|
|
|
constructor(public x: number, public y: number) { }
|
|
|
|
>x : number
|
|
|
|
>y : number
|
|
|
|
|
|
|
|
public toString() {
|
|
|
|
>toString : () => string
|
|
|
|
|
|
|
|
return "x=" + this.x + " y=" + this.y;
|
|
|
|
>"x=" + this.x + " y=" + this.y : string
|
|
|
|
>"x=" + this.x + " y=" : string
|
|
|
|
>"x=" + this.x : string
|
|
|
|
>this.x : number
|
|
|
|
>this : Point
|
|
|
|
>x : number
|
|
|
|
>this.y : number
|
|
|
|
>this : Point
|
|
|
|
>y : number
|
|
|
|
}
|
|
|
|
}
|
|
|
|
class ColoredPoint extends Point {
|
|
|
|
>ColoredPoint : ColoredPoint
|
|
|
|
>Point : Point
|
|
|
|
|
|
|
|
constructor(x: number, y: number, public color: string) {
|
|
|
|
>x : number
|
|
|
|
>y : number
|
|
|
|
>color : string
|
|
|
|
|
|
|
|
super(x, y);
|
|
|
|
>super(x, y) : void
|
2014-08-28 21:31:37 +02:00
|
|
|
>super : typeof Point
|
2014-08-15 23:33:16 +02:00
|
|
|
>x : number
|
|
|
|
>y : number
|
|
|
|
}
|
|
|
|
public toString() {
|
|
|
|
>toString : () => string
|
|
|
|
|
|
|
|
return super.toString() + " color=" + this.color;
|
|
|
|
>super.toString() + " color=" + this.color : string
|
|
|
|
>super.toString() + " color=" : string
|
|
|
|
>super.toString() : string
|
|
|
|
>super.toString : () => string
|
2014-08-28 21:31:37 +02:00
|
|
|
>super : Point
|
2014-08-15 23:33:16 +02:00
|
|
|
>toString : () => string
|
|
|
|
>this.color : string
|
|
|
|
>this : ColoredPoint
|
|
|
|
>color : string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|