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
|
tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts(9,7): error TS2420: Class 'C2' incorrectly implements interface 'C1'.
Property 'x' is missing in type 'C2'.
tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts(12,7): error TS2420: Class 'C3' incorrectly implements interface 'C1'.
Property 'y' is missing in type 'C3'.
tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts(16,7): error TS2420: Class 'C4' incorrectly implements interface 'C1'.
Property 'x' is missing in type 'C4'.
==== tests/cases/conformance/classes/classDeclarations/classImplementsMergedClassInterface.ts (3 errors) ====
declare class C1 {
x : number;
}
interface C1 {
y : number;
}
class C2 implements C1 { // error -- missing x
~~
!!! error TS2420: Class 'C2' incorrectly implements interface 'C1'.
!!! error TS2420: Property 'x' is missing in type 'C2'.
}
class C3 implements C1 { // error -- missing y
~~
!!! error TS2420: Class 'C3' incorrectly implements interface 'C1'.
!!! error TS2420: Property 'y' is missing in type 'C3'.
x : number;
}
class C4 implements C1 { // error -- missing x
~~
!!! error TS2420: Class 'C4' incorrectly implements interface 'C1'.
!!! error TS2420: Property 'x' is missing in type 'C4'.
y : number;
}
class C5 implements C1 { // okay
x : number;
y : number;
}
|