mirror of
https://github.com/swc-project/swc.git
synced 2024-12-20 04:01:39 +03:00
30 lines
457 B
TypeScript
30 lines
457 B
TypeScript
class Base {
|
|
x = 43;
|
|
constructor(n: string) {
|
|
|
|
}
|
|
}
|
|
|
|
function v(): void { }
|
|
|
|
class Derived extends Base {
|
|
//super call in class constructor of derived type
|
|
constructor(public q: number) {
|
|
super('');
|
|
//type of super call expression is void
|
|
var p = super('');
|
|
var p = v();
|
|
}
|
|
}
|
|
|
|
class OtherBase {
|
|
|
|
}
|
|
|
|
class OtherDerived extends OtherBase {
|
|
constructor() {
|
|
var p = '';
|
|
super();
|
|
}
|
|
}
|