2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2012-07-11 10:42:59 -07:00
|
|
|
|
2015-01-02 14:44:21 -08:00
|
|
|
macro_rules! mylambda_tt {
|
2012-11-21 15:53:49 -05:00
|
|
|
($x:ident, $body:expr) => ({
|
2020-11-25 17:00:28 -05:00
|
|
|
fn f($x: isize) -> isize { return $body; }
|
2012-07-11 10:42:59 -07:00
|
|
|
f
|
2012-11-21 15:53:49 -05:00
|
|
|
})
|
2015-01-02 14:44:21 -08:00
|
|
|
}
|
2012-07-11 10:42:59 -07:00
|
|
|
|
2015-06-07 21:00:38 +03:00
|
|
|
assert_eq!(mylambda_tt!(y, y * 2)(8), 16);
|
2011-08-19 15:16:48 -07:00
|
|
|
}
|