test generic

This commit is contained in:
Dima Granetchi
2015-01-18 02:54:28 +02:00
parent 94bca97041
commit 95aa6865f2
+18
View File
@@ -298,10 +298,28 @@ class BaseTest extends BuddySuite {
a.str = "123";
callNum.should.be(1);
});
it("bindx should resolve parametric types", {
var b = new GenericBindable<TypeBindable1>();
b.a = new TypeBindable1();
Bind.bind(b.a.str, function (_, _) {
callNum ++;
});
b.a.str = "123";
callNum.should.be(1);
});
});
}
}
//@:generic
class GenericBindable<A> {
public var a:A;
public function new() {}
}
typedef TypeBindable1 = Bindable1;
class Bindable1 implements bindx.IBindable {