diff options
author | Martin Odersky <odersky@gmail.com> | 2014-04-18 17:35:43 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-05-08 21:48:08 +0200 |
commit | a8894ed954e16b481379f09ce7e04342bd9b34f2 (patch) | |
tree | bf8b0b293ec43350d79d6ce5c52f3b7278d12c1a /src | |
parent | 92c02ee9d514c197221fd4c4a027fe0e70e081f2 (diff) | |
download | dotty-a8894ed954e16b481379f09ce7e04342bd9b34f2.tar.gz dotty-a8894ed954e16b481379f09ce7e04342bd9b34f2.tar.bz2 dotty-a8894ed954e16b481379f09ce7e04342bd9b34f2.zip |
Fixing stillValid code
We need to take into account that symbols can can have non-class owners yet still be valid.
Previously such symbols were treated as invalid. Now they are valid if their owners are valid.
The commit supersedes
29976d7922c5c3e99f0469e3db1
which got reverted.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 9cf06ec47..c7e7dc50d 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -46,8 +46,9 @@ trait SymDenotations { this: Context => case ClassInfo(_, _, _, _, selfInfo) => selfInfo == denot.symbol case _ => false } - stillValid(owner) && owner.isClass && ( - (owner.decls.lookupAll(denot.name) contains denot.symbol) + stillValid(owner) && ( + !owner.isClass + || (owner.decls.lookupAll(denot.name) contains denot.symbol) || isSelfSym ) } catch { |