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-11-04 22:41:00 -06:00
|
|
|
log(debug, test(f)); //~ ERROR expected @ closure, found ~ closure
|
2011-12-25 13:27:09 -06:00
|
|
|
}
|