2012-07-09 19:15:25 -07:00
|
|
|
mod stream {
|
2012-09-21 18:10:45 -07:00
|
|
|
#[legacy_exports];
|
2012-09-07 14:52:28 -07:00
|
|
|
enum stream<T: Send> { send(T, server::stream<T>), }
|
2012-07-09 19:15:25 -07:00
|
|
|
mod server {
|
2012-09-21 18:10:45 -07:00
|
|
|
#[legacy_exports];
|
2012-09-07 14:52:28 -07:00
|
|
|
impl<T: Send> stream<T> {
|
2012-09-23 04:39:27 -07:00
|
|
|
fn recv() -> extern fn(+v: stream<T>) -> stream::stream<T> {
|
2012-07-09 19:15:25 -07:00
|
|
|
// 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
|
|
|
|
}
|
|
|
|
}
|
2012-09-07 14:52:28 -07:00
|
|
|
type stream<T: Send> = pipes::RecvPacket<stream::stream<T>>;
|
2012-07-09 19:15:25 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|