Add test case for issue 2766, which resolve 3 fixes
This commit is contained in:
parent
d88497ddf2
commit
78088fb813
1 changed files with 21 additions and 0 deletions
21
src/test/compile-fail/issue-2766-a.rs
Normal file
21
src/test/compile-fail/issue-2766-a.rs
Normal 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() {}
|
Loading…
Add table
Add a link
Reference in a new issue