moved tests, added a test

This commit is contained in:
Arthur Ozga
2015-06-19 15:41:33 -07:00
parent 8f1790de4a
commit df3560f6a7
10 changed files with 26 additions and 1 deletions
@@ -0,0 +1,17 @@
abstract class A {
abstract foo() : number;
}
class B extends A {
foo() { return 1; }
}
abstract class C extends A {
abstract foo() : number;
}
var a = new B;
a.foo();
a = new C; // error, cannot instantiate abstract class.
a.foo();
@@ -15,4 +15,12 @@ var c : C;
a = new B;
b = new B;
c = new B;
c = new B;
module M {
export abstract class A {}
}
import myA = M.A;
var aa = new myA;