-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case for issue 2766, which resolve 3 fixes
- Loading branch information
1 parent
d88497d
commit 78088fb
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() {} |