Stop showing a 'cyclic import' message for unresolved imports

This only happened for single-length import paths, because the import
was being looked up in its own scope.
This commit is contained in:
Marijn Haverbeke 2011-05-24 20:58:38 +02:00
parent bad05e20a3
commit fbc0e840e3
3 changed files with 13 additions and 9 deletions

View file

@ -1,7 +1,7 @@
// xfail-stage0
// error-pattern: nonexistent module
// error-pattern: unresolved import: vec
import vec;
fn main() {
auto foo = vec.len([]);
auto foo = vec::len([]);
}

View file

@ -1,7 +1,10 @@
// error-pattern:cyclic import
// error-pattern: cyclic import
import x;
import y::x;
mod y {
import x;
}
fn main() {
auto y = x;
}