graydon/rust — Issue #1228: Compile error with ambiguous shortcut import resolving
Author: lht
Created: 2011-11-30 03:12:28+00:00
State: open

```java
mod foo {
mod bar {
mod foo {
fn i() {}
}
}
mod baz {
fn x() {
}
}
}

fn main() {
import foo::baz;
import foo::bar::foo;
}
```

```python
imp.rs:14:4: 14:19 error: unresolved import: baz
imp.rs:14 import foo::baz;
^~~~~~~~~~~~~~~
error: aborting due to previous errors
rust: upcall fail 'explicit failure', ../src/comp/driver/session.rs:70
rust: domain main @0x97dee28 root task failed

```

It would be nice to suggest using an alias instead of complaining unresolved error.