We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59fc40a commit a8344d3Copy full SHA for a8344d3
compiler/src/dotty/tools/dotc/typer/Checking.scala
@@ -624,9 +624,9 @@ trait Checking {
624
for (other <- seen(decl.name)) {
625
typr.println(i"conflict? $decl $other")
626
if (decl.matches(other)) {
627
- def doubleDefError(decl: Symbol, other: Symbol): Unit = {
628
- ctx.error(DoubleDeclaration(decl, other), decl.pos)
629
- }
+ def doubleDefError(decl: Symbol, other: Symbol): Unit =
+ if (!decl.info.isErroneous && !other.info.isErroneous)
+ ctx.error(DoubleDeclaration(decl, other), decl.pos)
630
if (decl is Synthetic) doubleDefError(other, decl)
631
else doubleDefError(decl, other)
632
}
0 commit comments