diff options
author | Martin Odersky <odersky@gmail.com> | 2016-11-09 12:33:14 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-12-01 13:55:12 +0100 |
commit | f1151d658ade02d6e838ab11d9d9700a89762558 (patch) | |
tree | 2722eebdfac6cab36aaecab233359f24fa3affe0 /compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala | |
parent | 7263d25b463423677c9e632088b813fadce464ba (diff) | |
download | dotty-f1151d658ade02d6e838ab11d9d9700a89762558.tar.gz dotty-f1151d658ade02d6e838ab11d9d9700a89762558.tar.bz2 dotty-f1151d658ade02d6e838ab11d9d9700a89762558.zip |
Be more lazy in namedImportRef
We got a hard to track down error when changing to the new
annotations elaboration scheme (should be in the next commit):
When running `testNonCyclic`, `DotClass` was not found in object Trees
even though it was imported from `util`. It turned out that the import
was ignored because the `util` symbol was completing.
This commit adds a warning when this happens. The warning currently applies
only to named imports because several false negatives were encountered if
we do this also on wildcard imports. I.e. we get a warning, but the searched
after symbol is not a member of the wildcard qualifier.
This commit also refactors namedImportRef, so that `site` is only
computed when the name to reseolve appears in the selector list.
That change made the previously observed error go away because less
is now forced.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/repl/CompilingInterpreter.scala')
0 files changed, 0 insertions, 0 deletions