Skip to content

Commit

Permalink
Add test case for issue 2766, which resolve 3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Jul 10, 2012
1 parent d88497d commit 78088fb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/compile-fail/issue-2766-a.rs
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit 78088fb

Please sign in to comment.