rust/src/test/compile-fail/macro-2.rs
2012-08-23 11:14:14 -07:00

10 lines
246 B
Rust

//error-pattern:is an expr, expected an identifier
fn main() {
#macro[[#mylambda[x, body],
{
fn f(x: int) -> int { return body }
f
}]];
assert (mylambda!(y * 1, y * 2)(8) == 16);
}