rust/src/test/run-pass/macro-2.rs

5 lines
121 B
Rust
Raw Normal View History

2011-06-27 12:58:05 -05:00
fn main() {
#macro([#mylambda[x,body], {fn f(x: int) -> int { ret body }; f}]);
assert(#mylambda[y,y*2](8) == 16);
2011-06-27 12:58:05 -05:00
}