28 lines
908 B
Text
28 lines
908 B
Text
|
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations1.ts(8,1): error TS2511: Cannot create an instance of the abstract class 'A'.
|
||
|
tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations1.ts(10,1): error TS2511: Cannot create an instance of the abstract class 'C'.
|
||
|
|
||
|
|
||
|
==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractInstantiations1.ts (2 errors) ====
|
||
|
|
||
|
abstract class A {}
|
||
|
|
||
|
class B extends A {}
|
||
|
|
||
|
abstract class C extends B {}
|
||
|
|
||
|
new A;
|
||
|
~~~~~
|
||
|
!!! error TS2511: Cannot create an instance of the abstract class 'A'.
|
||
|
new B;
|
||
|
new C;
|
||
|
~~~~~
|
||
|
!!! error TS2511: Cannot create an instance of the abstract class 'C'.
|
||
|
|
||
|
var a : A;
|
||
|
var b : B;
|
||
|
var c : C;
|
||
|
|
||
|
a = new B;
|
||
|
b = new B;
|
||
|
c = new B;
|
||
|
|