rust/src/test/run-pass/self-shadowing-import.rs
Marijn Haverbeke c7bfef43c8 Ignore current scope when resolving self-shadowing imports
That is, for example, import x::y::x, which defines a local x,
and thus wouldn't be able to find x::y anymore.

Closes issue #624
2011-07-08 16:04:40 +02:00

17 lines
192 B
Rust

mod a {
mod b {
mod a {
fn foo() -> int { ret 1; }
}
}
}
mod c {
import a::b::a;
fn bar() { assert a::foo() == 1; }
}
fn main() {
c::bar();
}