Skip to content

Commit 956572f

Browse files
author
Sara Alemanno
committed
Update StringContextMacro.scala
1 parent c27c7a2 commit 956572f

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import reflect._
88
object StringContextMacro {
99

1010
/** Implementation of scala.StringContext.f used in Dotty */
11-
inline def f(sc: => StringContext)(args: Any*): String = ${ fImpl('sc, 'args) }
11+
inline def f(sc: => StringContext)(args: Any*): String = ${ interpolate('sc, 'args) }
1212

1313
/** This trait defines a tool to report errors/warnings that do not depend on Position. */
1414
trait Reporter {
@@ -745,15 +745,4 @@ object StringContextMacro {
745745
// macro expansion
746746
'{(${parts.mkString.toExpr}).format(${argsExpr}: _*)}
747747
}
748-
749-
/** Applies the interpolation to the input of the f-interpolator macro
750-
*
751-
* @param strCtxExpr the Expr containing the StringContext with the parts of the formatting String
752-
* @param argsExpr the Expr containing the list of arguments to interpolate
753-
* @return the Expr containing the interpolated String, reports an error/warning if any formatting parameter does not
754-
* respect the formatting rules
755-
*/
756-
final def fImpl(strCtxExpr: Expr[StringContext], args: Expr[Seq[Any]])(implicit reflect:Reflection): Expr[String] = {
757-
interpolate(strCtxExpr, args)
758-
}
759748
}

0 commit comments

Comments
 (0)