Skip to content

Commit fa461e2

Browse files
committed
Don't report double def errors if symbol's type is erroneous
This happened for singletonOrs, and led to spurious errors there.
1 parent ea41b79 commit fa461e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,8 @@ object Denotations {
336336
(!sym2.isAsConcrete(sym1) ||
337337
precedes(sym1.owner, sym2.owner) ||
338338
accessBoundary(sym2).isProperlyContainedIn(accessBoundary(sym1)) ||
339-
sym1.is(Method) && !sym2.is(Method))
339+
sym1.is(Method) && !sym2.is(Method)) ||
340+
sym1.info.isErroneous
340341

341342
/** Sym preference provided types also override */
342343
def prefer(sym1: Symbol, sym2: Symbol, info1: Type, info2: Type) =

0 commit comments

Comments
 (0)