New semantic analyzer: fix ambiguity between submodule and local definition (#7017)
Now imports are biased to target the submodule of current package
target, but elsewhere a local definition with the same name as a
submodule takes precedence. Even though this doesn't quite reflect
what happens at runtime, this seems to cover the typical use cases
well, and the implementation is simple.
Fixes #6828.
Committer
Guido van Rossum