summary refs log tree commit diff
path: root/src/test/compile-fail/issue-2766-a.rs
blob: ce24b4a6a521a18fc7f3b943261aa007111b31a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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() {}