From 69623da92518c591e0c4ab651cade28e94ee9a9a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 24 Aug 2013 12:44:40 +0200 Subject: When merging denotations with &, always avoid NoSymbol when you can. --- src/dotty/tools/dotc/core/Denotations.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core') 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 -- cgit v1.2.3