Add test case for issue 2766, which resolve 3 fixes

This commit is contained in:
Tim Chevalier 2012-07-09 19:15:25 -07:00
parent d88497ddf2
commit 78088fb813

View file

@ -0,0 +1,21 @@
mod stream {
enum stream<T: send> { send(T, server::stream<T>), }
mod server {
impl recv<T: send> for stream<T> {
fn recv() -> extern fn(+stream<T>) -> stream::stream<T> {
// resolve really should report just one error here.
// Change the test case when it changes.
fn recv(+pipe: stream<T>) -> stream::stream<T> { //~ ERROR attempt to use a type argument out of scope
//~^ ERROR use of undeclared type name
//~^^ ERROR attempt to use a type argument out of scope
//~^^^ ERROR use of undeclared type name
option::unwrap(pipes::recv(pipe))
}
recv
}
}
type stream<T: send> = pipes::recv_packet<stream::stream<T>>;
}
}
fn main() {}