mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 15:12:08 +03:00
24 lines
249 B
TypeScript
24 lines
249 B
TypeScript
|
|
//
|
|
// Calling new with (non)abstract classes.
|
|
//
|
|
|
|
abstract class A {}
|
|
|
|
class B extends A {}
|
|
|
|
abstract class C extends B {}
|
|
|
|
new A;
|
|
new A(1); // should report 1 error
|
|
new B;
|
|
new C;
|
|
|
|
var a : A;
|
|
var b : B;
|
|
var c : C;
|
|
|
|
a = new B;
|
|
b = new B;
|
|
c = new B;
|