私は次の解決策に行き着きました - それはかなり醜いですが、うまくいきます:
import scala.language.experimental.macros
import scala.reflect.macros.Context
import scala.reflect.macros.runtime.{Context => ContextR}
import scala.tools.reflect.MacroImplementations
def putfImpl(cx: Context)(args: cx.Expr[Any]*): cx.Expr[Unit] = {
val cx2 = cx.asInstanceOf[ContextR]
val args2 = args.toList.asInstanceOf[List[cx2.Expr[Any]]]
import cx2.universe._
val Apply(_, List(Apply(_, partsE))) = cx2.prefix.tree
val mi = new { val c : cx2.type = cx2 } with MacroImplementations
val res = mi.macro_StringInterpolation_f(partsE, args2.map(_.tree), cx2.enclosingPosition)
reify(println(cx2.Expr[String](res).splice)).asInstanceOf[cx.Expr[Unit]]
}