Adding a test case to make sure spawning polymorphic functions works.

This commit is contained in:
Eric Holk 2011-08-26 16:30:22 -07:00
parent 230a5869b4
commit 45cac8a95f

View File

@ -64,3 +64,15 @@ fn test_join_convenient() {
let handle = task::spawn_joinable(f);
assert (task::tr_success == task::join(handle));
}
#[test]
fn spawn_polymorphic() {
fn foo<~T>(x : -T) {
log_err x;
}
let fb = bind foo(true);
task::spawn(fb);
task::spawn(bind foo(42));
}