rust/src/test/compile-fail/macro-2.rs

7 lines
180 B
Rust
Raw Normal View History

2011-07-13 18:46:50 -07:00
// xfail-stage0
//error-pattern:expanded as an identifier
fn main() {
#macro([#mylambda(x, body), {fn f(int x) -> int {ret body}; f}]);
assert(#mylambda(y*1, y*2)(8) == 16);
}