diff options
author | Martin Odersky <odersky@gmail.com> | 2013-08-24 12:44:40 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-08-24 12:44:40 +0200 |
commit | 69623da92518c591e0c4ab651cade28e94ee9a9a (patch) | |
tree | caaa39f1046ceba768cd6e717d171a4bcaad7f03 /src/dotty/tools/dotc/core/Denotations.scala | |
parent | f194e40eacf9c03fa362565f10e5bbb617cb9a84 (diff) | |
download | dotty-69623da92518c591e0c4ab651cade28e94ee9a9a.tar.gz dotty-69623da92518c591e0c4ab651cade28e94ee9a9a.tar.bz2 dotty-69623da92518c591e0c4ab651cade28e94ee9a9a.zip |
When merging denotations with &, always avoid NoSymbol when you can.
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Denotations.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 34580ad4c..1b0981ad3 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -243,7 +243,9 @@ object Denotations { if (info1 <:< info2 && sym1Accessible) denot1 else { val sym = - if (!sym1Accessible) sym2 + if (!sym1.exists) sym2 + else if (!sym2.exists) sym1 + else if (!sym1Accessible) sym2 else if (!sym2Accessible) sym1 else if (sym2 isAsConcrete sym1) sym2 else sym1 |