2012-01-09 18:12:37 -06:00
|
|
|
fn test(f: fn@(uint) -> uint) -> uint {
|
2012-08-01 19:30:05 -05:00
|
|
|
return f(22u);
|
2011-12-16 15:50:22 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2012-08-01 19:30:05 -05:00
|
|
|
let f = fn~(x: uint) -> uint { return 4u; };
|
2012-06-30 06:23:59 -05:00
|
|
|
log(debug, test(f)); //~ ERROR expected `fn@(uint) -> uint`
|
2011-12-25 13:27:09 -06:00
|
|
|
}
|