Skip to content

Commit c27c7a2

Browse files
author
Sara Alemanno
committed
Update StringContextMacro.scala
1 parent 3a1e403 commit c27c7a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/src-3.x/dotty/internal/StringContextMacro.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ object StringContextMacro {
358358
*/
359359
def checkSubtype(actualType : Type, expectedType : String, argIndex : Int, possibilities : Type*) = {
360360
if (possibilities.find(actualType <:< _).isEmpty)
361-
reporter.argError("type mismatch;\n found : " + actualType.widen.show.stripPrefix("scala.Predef.").stripPrefix("scala.") + "\n required: " + expectedType, argIndex)
361+
reporter.argError("type mismatch;\n found : " + actualType.widen.show.stripPrefix("scala.Predef.").stripPrefix("java.lang.").stripPrefix("scala.") + "\n required: " + expectedType, argIndex)
362362
}
363363

364364
/** Checks whether a given argument index, relative or not, is in the correct bounds
@@ -642,7 +642,7 @@ object StringContextMacro {
642642
case 'h' | 'H' | 'S' | 's' =>
643643
if (!(argType <:< typeOf[java.util.Formattable]))
644644
for {flag <- flags ; if (flag._1 == '#')}
645-
reporter.argError("type mismatch;\n found : " + argType.widen.show.stripPrefix("scala.Predef.").stripPrefix("scala.") + "\n required: java.util.Formattable", argIndex)
645+
reporter.argError("type mismatch;\n found : " + argType.widen.show.stripPrefix("scala.Predef.").stripPrefix("java.lang.").stripPrefix("scala.") + "\n required: java.util.Formattable", argIndex)
646646
case 'n' | '%' =>
647647
case illegal =>
648648
}

0 commit comments

Comments
 (0)