aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-08-24 12:44:40 +0200
committerMartin Odersky <odersky@gmail.com>2013-08-24 12:44:40 +0200
commit69623da92518c591e0c4ab651cade28e94ee9a9a (patch)
treecaaa39f1046ceba768cd6e717d171a4bcaad7f03 /src/dotty/tools/dotc/core/Denotations.scala
parentf194e40eacf9c03fa362565f10e5bbb617cb9a84 (diff)
downloaddotty-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.scala4
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