Skip to content

Commit 38ac631

Browse files
committed
Make String_valueOf_Object agnostic of whether it runs before or after erasure
1 parent 11e7dd8 commit 38ac631

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ class Definitions {
273273

274274
lazy val String_+ = newMethod(StringClass, nme.raw.PLUS, methOfAny(StringType), Final)
275275
lazy val String_valueOf_Object = StringModule.info.member(nme.valueOf).suchThat(_.info.firstParamTypes match {
276-
case List(pt) => pt isRef AnyClass
276+
case List(pt) => (pt isRef AnyClass) || (pt isRef ObjectClass)
277277
case _ => false
278278
}).symbol
279279

0 commit comments

Comments
 (0)