// -*- rust -*-
fn f() -> int {
ret 42;
}
fn main() {
let fn() -> int g = f;
let int i = g();
check(i == 42);
}
// -*- rust -*-
fn f() -> int {
ret 42;
}
fn main() {
let fn() -> int g = f;
let int i = g();
assert (i == 42);
}
// -*- rust -*-
fn f() -> int {
ret 42;
}
fn main() {
let fn() -> int g = f;
let int i = g();
check(i == 42);
}
// -*- rust -*-
fn f() -> int {
ret 42;
}
fn main() {
let fn() -> int g = f;
let int i = g();
assert (i == 42);
}
// -*- rust -*-
fn f() -> int { ret 42; }
fn main() { let fn() -> int g = f; let int i = g(); assert (i == 42); }
// -*- rust -*-
fn f() -> int { ret 42; }
fn main() { let g: fn() -> int = f; let i: int = g(); assert (i == 42); }
// -*- rust -*-
fn f() -> int { ret 42; }
fn main() { let g: fn() -> int = f; let i: int = g(); assert (i == 42); }
// -*- rust -*-
fn f() -> int { ret 42; }
fn main() {
let g: native fn() -> int = f;
let i: int = g();
assert (i == 42);
}
// -*- rust -*-
fn f() -> int { ret 42; }
fn main() {
let g: extern fn() -> int = f;
let i: int = g();
assert (i == 42);
}
// -*- rust -*-
fn f() -> int { return 42; }
fn main() {
let g: extern fn() -> int = f;
let i: int = g();
assert (i == 42);
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
fn f() -> int { return 42; }
fn main() {
let g: extern fn() -> int = f;
let i: int = g();
assert (i == 42);
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
fn f() -> int { return 42; }
pub fn main() {
let g: extern fn() -> int = f;
let i: int = g();
assert (i == 42);
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
fn f() -> int { return 42; }
pub fn main() {
let g: extern fn() -> int = f;
let i: int = g();
fail_unless!((i == 42));
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
fn f() -> int { return 42; }
pub fn main() {
let g: extern fn() -> int = f;
let i: int = g();
assert!((i == 42));
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// -*- rust -*-
fn f() -> int { return 42; }
pub fn main() {
let g: extern fn() -> int = f;
let i: int = g();
assert_eq!(i, 42);
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn f() -> int { return 42; }
pub fn main() {
let g: extern fn() -> int = f;
let i: int = g();
assert_eq!(i, 42);
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn f() -> int { return 42; }
pub fn main() {
let g: fn() -> int = f;
let i: int = g();
assert_eq!(i, 42);
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn f() -> int { return 42; }
pub fn main() {
let g: fn() -> int = f;
let i: int = g();
assert_eq!(i, 42);
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// pretty-expanded FIXME #23616
fn f() -> isize { return 42; }
pub fn main() {
let g: fn() -> isize = f;
let i: isize = g();
assert_eq!(i, 42);
}
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn f() -> isize { return 42; }
pub fn main() {
let g: fn() -> isize = f;
let i: isize = g();
assert_eq!(i, 42);
}