1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
=== tests/cases/conformance/expressions/superCalls/superCalls.ts ===
class Base {
>Base : Base
x = 43;
>x : number
>43 : 43
constructor(n: string) {
>n : string
}
}
function v(): void { }
>v : () => void
class Derived extends Base {
>Derived : Derived
>Base : Base
//super call in class constructor of derived type
constructor(public q: number) {
>q : number
super('');
>super('') : void
>super : typeof Base
>'' : ""
//type of super call expression is void
var p = super('');
>p : void
>super('') : void
>super : typeof Base
>'' : ""
var p = v();
>p : void
>v() : void
>v : () => void
}
}
class OtherBase {
>OtherBase : OtherBase
}
class OtherDerived extends OtherBase {
>OtherDerived : OtherDerived
>OtherBase : OtherBase
constructor() {
var p = '';
>p : string
>'' : ""
super();
>super() : void
>super : typeof OtherBase
}
}
|