TypeScript/tests/baselines/reference/superCalls.types
2015-04-15 16:44:20 -07:00

65 lines
1,003 B
Plaintext

=== tests/cases/conformance/expressions/superCalls/superCalls.ts ===
class Base {
>Base : Base
x = 43;
>x : number
>43 : number
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
>'' : string
//type of super call expression is void
var p = super('');
>p : void
>super('') : void
>super : typeof Base
>'' : string
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
>'' : string
super();
>super() : void
>super : typeof OtherBase
}
}