rust/src/test/compile-fail/sendfn-is-not-a-lambda.rs

10 lines
218 B
Rust
Raw Normal View History

// error-pattern: mismatched types: expected lambda(++uint) -> uint
fn test(f: lambda(uint) -> uint) -> uint {
ret f(22u);
}
fn main() {
let f = sendfn(x: uint) -> uint { ret 4u; };
log(debug, test(f));
}