PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/jruderman/rust
Rust | 11 lines | 6 code | 4 blank | 1 comment | 2 complexity | a9647c3dd7debf334424dcadf7e0f0f5 MD5 | raw file
 1// xfail-fast
 2
 3fn f() -> int { return 1; }
 4
 5mod foo {
 6    fn f() -> int { return 2; }
 7    fn g() { assert (f() == 2); assert (::f() == 1); }
 8}
 9
10fn main() { return foo::g(); }
11