2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/superInConstructorParam1.ts(8,3): error TS2377: Constructors for derived classes must contain a 'super' call.
|
|
|
|
tests/cases/compiler/superInConstructorParam1.ts(8,19): error TS2336: 'super' cannot be referenced in constructor arguments.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/superInConstructorParam1.ts (2 errors) ====
|
|
|
|
class B {
|
|
|
|
public foo(): number {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class C extends B {
|
|
|
|
constructor(a = super.foo()) {
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2336: 'super' cannot be referenced in constructor arguments.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2377: Constructors for derived classes must contain a 'super' call.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|