46 lines
No EOL
1.8 KiB
Text
46 lines
No EOL
1.8 KiB
Text
tests/cases/conformance/classes/classDeclarations/classWithAbstractMethods.ts(1,7): error TS2514: Classes containing abstract functions must be marked abstract.
|
|
tests/cases/conformance/classes/classDeclarations/classWithAbstractMethods.ts(2,5): error TS1238: Abstract methods can only appear within an abstract class.
|
|
tests/cases/conformance/classes/classDeclarations/classWithAbstractMethods.ts(5,7): error TS2415: Class 'B' incorrectly extends base class 'A'.
|
|
Non-abstract class 'B' does not implement inherited abstract member 'A.foo'.
|
|
tests/cases/conformance/classes/classDeclarations/classWithAbstractMethods.ts(21,7): error TS2415: Class 'BB' incorrectly extends base class 'AA'.
|
|
Non-abstract class 'BB' does not implement inherited abstract member 'AA.foo'.
|
|
|
|
|
|
==== tests/cases/conformance/classes/classDeclarations/classWithAbstractMethods.ts (4 errors) ====
|
|
class A {
|
|
~
|
|
!!! error TS2514: Classes containing abstract functions must be marked abstract.
|
|
abstract foo();
|
|
~~~~~~~~
|
|
!!! error TS1238: Abstract methods can only appear within an abstract class.
|
|
}
|
|
|
|
class B extends A {}
|
|
~
|
|
!!! error TS2415: Class 'B' incorrectly extends base class 'A'.
|
|
!!! error TS2415: Non-abstract class 'B' does not implement inherited abstract member 'A.foo'.
|
|
|
|
abstract class C extends A {}
|
|
|
|
class D extends A {
|
|
foo() {}
|
|
}
|
|
|
|
abstract class E extends A {
|
|
foo() {}
|
|
}
|
|
|
|
abstract class AA {
|
|
abstract foo();
|
|
}
|
|
|
|
class BB extends AA {}
|
|
~~
|
|
!!! error TS2415: Class 'BB' incorrectly extends base class 'AA'.
|
|
!!! error TS2415: Non-abstract class 'BB' does not implement inherited abstract member 'AA.foo'.
|
|
|
|
abstract class CC extends AA {}
|
|
|
|
class DD extends AA {
|
|
foo() {}
|
|
} |