Skip to content

Commit 78088fb

Browse files
committedJul 10, 2012
Add test case for issue 2766, which resolve 3 fixes
1 parent d88497d commit 78088fb

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
 

‎src/test/compile-fail/issue-2766-a.rs

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
mod stream {
2+
enum stream<T: send> { send(T, server::stream<T>), }
3+
mod server {
4+
impl recv<T: send> for stream<T> {
5+
fn recv() -> extern fn(+stream<T>) -> stream::stream<T> {
6+
// resolve really should report just one error here.
7+
// Change the test case when it changes.
8+
fn recv(+pipe: stream<T>) -> stream::stream<T> { //~ ERROR attempt to use a type argument out of scope
9+
//~^ ERROR use of undeclared type name
10+
//~^^ ERROR attempt to use a type argument out of scope
11+
//~^^^ ERROR use of undeclared type name
12+
option::unwrap(pipes::recv(pipe))
13+
}
14+
recv
15+
}
16+
}
17+
type stream<T: send> = pipes::recv_packet<stream::stream<T>>;
18+
}
19+
}
20+
21+
fn main() {}

0 commit comments

Comments
 (0)
Please sign in to comment.