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