File tree Expand file tree Collapse file tree 3 files changed +18
-4
lines changed
compiler/src/dotty/tools/dotc/reporting Expand file tree Collapse file tree 3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -2174,10 +2174,12 @@ import transform.SymUtils._
21742174 else
21752175 " Name clash between inherited members"
21762176
2177- em """ $clashDescription:
2178- | ${previousDecl.showDcl} ${symLocation(previousDecl)} and
2179- | ${decl.showDcl} ${symLocation(decl)}
2180- | """ + details
2177+ atPhase(typerPhase) {
2178+ em """ $clashDescription:
2179+ | ${previousDecl.showDcl} ${symLocation(previousDecl)} and
2180+ | ${decl.showDcl} ${symLocation(decl)}
2181+ | """
2182+ } + details
21812183 }
21822184 def explain = " "
21832185 }
Original file line number Diff line number Diff line change 1+ -- [E120] Naming Error: tests/neg/i14966.scala:2:11 --------------------------------------------------------------------
2+ 2 | export s.* // error
3+ | ^
4+ | Double definition:
5+ | final def concat[B >: T](suffix: IterableOnce[B]): Set[B] in class B at line 2 and
6+ | final def concat(that: IterableOnce[T]): Set[T] in class B at line 2
7+ | have the same type after erasure.
8+ |
9+ | Consider adding a @targetName annotation to one of the conflicting definitions
10+ | for disambiguation.
Original file line number Diff line number Diff line change 1+ class B [T ](val s : Set [T ]):
2+ export s .* // error
You can’t perform that action at this time.
0 commit comments