summary refs log tree commit diff
path: root/src/test/compile-fail/sendfn-is-not-a-lambda.rs
blob: 081c400d71d180d80a23634eb14037d39e3fb67a (plain)
1
2
3
4
5
6
7
8
fn test(f: fn@(uint) -> uint) -> uint {
    return f(22u);
}

fn main() {
    let f = fn~(x: uint) -> uint { return 4u; };
    log(debug, test(f)); //~ ERROR expected `fn@(uint) -> uint`
}