File tree 3 files changed +4
-2
lines changed
compiler/scala/tools/nsc/typechecker
reflect/scala/reflect/internal
3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -856,7 +856,7 @@ trait Contexts { self: Analyzer =>
856
856
! ({
857
857
// [eed3si9n] ideally I'd like to do this: val fd = settings.isScala214 && sym.isDeprecated
858
858
// but implicit caching currently does not report sym.isDeprecated correctly.
859
- val fd = settings.isScala214 && (name ne null ) && definitions.isPredefMemberNamed(sym, TermName ( " any2stringadd " ) )
859
+ val fd = settings.isScala214 && (sym == currentRun.runDefinitions. Predef_any2stringaddMethod )
860
860
if (settings.XlogImplicits && fd) echo(sym.pos, sym + " is not a valid implicit value because:\n " + " -Xsource:2.14 removes scala.Predef.any2stringadd" )
861
861
fd
862
862
}) &&
Original file line number Diff line number Diff line change @@ -1504,6 +1504,7 @@ trait Definitions extends api.StandardDefinitions {
1504
1504
lazy val Predef_classOf = getMemberMethod(PredefModule , nme.classOf )
1505
1505
lazy val Predef_implicitly = getMemberMethod(PredefModule , nme.implicitly)
1506
1506
lazy val Predef_??? = DefinitionsClass .this .Predef_???
1507
+ lazy val Predef_any2stringaddMethod = PredefModule .info.decl(nme.any2stringadd.toTermName).suchThat(_.isMethod)
1507
1508
1508
1509
lazy val arrayApplyMethod = getMemberMethod(ScalaRunTimeModule , nme.array_apply)
1509
1510
lazy val arrayUpdateMethod = getMemberMethod(ScalaRunTimeModule , nme.array_update)
Original file line number Diff line number Diff line change @@ -491,7 +491,7 @@ trait StdNames {
491
491
if (isConstructorName(name))
492
492
DEFAULT_GETTER_INIT_STRING + pos
493
493
else
494
- name + DEFAULT_GETTER_STRING + pos
494
+ name.toString + DEFAULT_GETTER_STRING + pos
495
495
)
496
496
// Nominally, name from name$default$N, CONSTRUCTOR for <init>
497
497
def defaultGetterToMethod (name : Name ): TermName = (
@@ -654,6 +654,7 @@ trait StdNames {
654
654
val accessor : NameType = " accessor"
655
655
val add_ : NameType = " add"
656
656
val annotation : NameType = " annotation"
657
+ val any2stringadd : NameType = " any2stringadd"
657
658
val anyHash : NameType = " anyHash"
658
659
val anyValClass : NameType = " anyValClass"
659
660
val apply : NameType = " apply"
You can’t perform that action at this time.
0 commit comments