feat(transpiler): implement @IMPLEMENTS

This commit is contained in:
vsavkin
2014-12-22 14:15:18 -08:00
parent a37950293a
commit 965f70bfbe
5 changed files with 122 additions and 6 deletions

View File

@ -0,0 +1,22 @@
import {ddescribe, describe, it, expect, IS_DARTIUM} from 'test_lib/test_lib';
import {IMPLEMENTS} from './fixtures/annotations';
class Interface1 {}
class Interface2 {}
@IMPLEMENTS(Interface1, Interface2)
class SomeClass {}
export function main() {
describe('interfaces', function() {
//TODO: remvoe when interfaces are supported in AtScript
if (IS_DARTIUM) {
it('should work', function () {
var s = new SomeClass();
expect(s instanceof Interface1).toBeTrue();
expect(s instanceof Interface2).toBeTrue();
});
}
});
}