From 2f01c7d1ba4ab4d542c3838e184a5ac9735578f4 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 2 Oct 2016 13:17:04 +0200 Subject: Don't report double def errors if symbol's type is erroneous This happened for singletonOrs, and led to spurious errors there. --- src/dotty/tools/dotc/core/Denotations.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc') diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 4f01c43cf..0f95fc591 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -336,7 +336,8 @@ object Denotations { (!sym2.isAsConcrete(sym1) || precedes(sym1.owner, sym2.owner) || accessBoundary(sym2).isProperlyContainedIn(accessBoundary(sym1)) || - sym1.is(Method) && !sym2.is(Method)) + sym1.is(Method) && !sym2.is(Method)) || + sym1.info.isErroneous /** Sym preference provided types also override */ def prefer(sym1: Symbol, sym2: Symbol, info1: Type, info2: Type) = -- cgit v1.2.3