2019-07-26 16:54:25 -05:00
|
|
|
//@ run-pass
|
|
|
|
|
2015-03-25 19:06:52 -05:00
|
|
|
fn f() -> isize { return 42; }
|
2011-06-15 13:19:50 -05:00
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2015-03-25 19:06:52 -05:00
|
|
|
let g: fn() -> isize = f;
|
|
|
|
let i: isize = g();
|
2013-05-18 21:02:45 -05:00
|
|
|
assert_eq!(i, 42);
|
2012-01-11 11:58:05 -06:00
|
|
|
}
|