Files
swift-mirror/lib/AST/ModuleNameLookup.cpp
Jordan Rose ec4234bdbc Perform unqualified lookup using the current SourceFile as context.
And, properly treat imports as per-file: when looking up decls through the
TU module, don't pick up every other source file's imports.

This implements our resolution rules:
1. Check the current source file.
2. Check the current module.
3. Check imported modules.

Currently, "import Foo" is treated as a file-private import and
"@reexported import Foo" is treated as a public /and/ module-wide import.
This further suggests that access control is the right tool for re-export
control:

(private) import Foo // current file only
package import Foo   // whole module
public import Foo    // whole world

Swift SVN r9682
2013-10-25 22:21:12 +00:00

11 KiB