2011-07-21 18:47:47 -05:00
|
|
|
//error-pattern:is an expr, expected an identifier
|
2011-06-20 19:26:17 -05:00
|
|
|
fn main() {
|
2011-08-19 17:16:48 -05:00
|
|
|
#macro[[#mylambda[x, body],
|
|
|
|
{
|
|
|
|
fn f(x: int) -> int { ret body }
|
|
|
|
f
|
|
|
|
}]];
|
2011-07-13 17:44:09 -05:00
|
|
|
|
2011-08-19 17:16:48 -05:00
|
|
|
assert (#mylambda[y * 1, y * 2](8) == 16);
|
|
|
|
}
|