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
|
tests/cases/conformance/override/override8.ts(6,17): error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'B'.
tests/cases/conformance/override/override8.ts(18,17): error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'BB'.
tests/cases/conformance/override/override8.ts(24,12): error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'BB'.
==== tests/cases/conformance/override/override8.ts (3 errors) ====
class B {
a: string
}
class D extends B {
constructor(public a: string, public b: string) {
~~~~~~~~~~~~~~~~
!!! error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'B'.
super();
}
}
class BB {
constructor(public a: string) {
}
}
class DD extends BB {
constructor(public a: string) {
~~~~~~~~~~~~~~~~
!!! error TS4115: This parameter property must have an 'override' modifier because it overrides a member in base class 'BB'.
super(a)
}
}
class DDD extends BB {
public a: string;
~
!!! error TS4114: This member must have an 'override' modifier because it overrides a member in the base class 'BB'.
constructor(a: string) {
super(a)
this.a = a
}
}
|