File tree 3 files changed +18
-4
lines changed
compiler/src/dotty/tools/dotc/reporting
3 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -2167,10 +2167,12 @@ import transform.SymUtils._
2167
2167
else
2168
2168
" Name clash between inherited members"
2169
2169
2170
- em """ $clashDescription:
2171
- | ${previousDecl.showDcl} ${symLocation(previousDecl)} and
2172
- | ${decl.showDcl} ${symLocation(decl)}
2173
- | """ + details
2170
+ atPhase(typerPhase) {
2171
+ em """ $clashDescription:
2172
+ | ${previousDecl.showDcl} ${symLocation(previousDecl)} and
2173
+ | ${decl.showDcl} ${symLocation(decl)}
2174
+ | """
2175
+ } + details
2174
2176
}
2175
2177
def explain = " "
2176
2178
}
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