rust/src/test/run-pass/global-scope.rs

15 lines
189 B
Rust
Raw Normal View History

// xfail-stage0
fn f() -> int { ret 1; }
mod foo {
fn f() -> int { ret 2; }
fn g() {
assert (f() == 2);
assert (::f() == 1);
}
}
fn main() { ret foo::g(); }