@@ -38,6 +38,7 @@ import dotty.tools.dotc.util.SourceFile
3838import dotty .tools .dotc .config .SourceVersion
3939import DidYouMean .*
4040import Message .Disambiguation
41+ import dotty .tools .dotc .transform .Erasure
4142
4243/** Messages
4344 * ========
@@ -2333,7 +2334,7 @@ class DoubleDefinition(decl: Symbol, previousDecl: Symbol, base: Symbol)(using C
23332334extends NamingMsg (DoubleDefinitionID ) {
23342335 def msg (using Context ) = {
23352336 def nameAnd = if (decl.name != previousDecl.name) " name and" else " "
2336- def erasedType = if ctx.erasedTypes then i " ${decl.info}" else " "
2337+ def erasedType = if ctx.erasedTypes then i " ${decl.info}" else s " ${atPhase( Phases .erasurePhase) {(decl.info.show)}} "
23372338 def details (using Context ): String =
23382339 if (decl.isRealMethod && previousDecl.isRealMethod) {
23392340 import Signature .MatchDegree .*
@@ -2361,7 +2362,7 @@ extends NamingMsg(DoubleDefinitionID) {
23612362 |Consider adding a @targetName annotation to one of the conflicting definitions
23622363 |for disambiguation. """
23632364 else " "
2364- i " have the same $nameAnd type $erasedType after erasure. $hint"
2365+ i " have the same $nameAnd type $erasedType after erasure. $hint"
23652366 }
23662367 }
23672368 else " "
@@ -2374,7 +2375,7 @@ extends NamingMsg(DoubleDefinitionID) {
23742375 }
23752376 val clashDescription =
23762377 if (decl.owner eq previousDecl.owner)
2377- " Double definition "
2378+ " Conflicting definitions "
23782379 else if ((decl.owner eq base) || (previousDecl eq base))
23792380 " Name clash between defined and inherited member"
23802381 else
0 commit comments