In resolve3, error on non-existent imports

Closes #2937
This commit is contained in:
Tim Chevalier 2012-07-18 15:14:23 -07:00
parent de5d5e6eeb
commit 3119afc6e8
2 changed files with 20 additions and 0 deletions

View file

@ -1904,6 +1904,16 @@ class Resolver {
}
}
let i = import_resolution;
alt (i.module_target, i.value_target, i.type_target, i.impl_target) {
/*
If this name wasn't found in any of the four namespaces, it's
definitely unresolved
*/
(none, none, none, v) if v.len() == 0 { ret Failed; }
_ {}
}
assert import_resolution.outstanding_references >= 1u;
import_resolution.outstanding_references -= 1u;