Closed
Description
% scalac-hash 35209fc sandbox/test.scala
sandbox/test.scala:2: error: type mismatch;
found : Any
required: Double
f"${if (true) 2.5 else 2.5}%.2f"
^
one error found
% scalac-hash 35209fc~1 sandbox/test.scala
% cat sandbox/test.scala
object Test {
f"${if (true) 2.5 else 2.5}%.2f"
}
Regressed in: scala/scala@35209fc
Might also be linked to the "boxity" of fast track macros.
I reckon changing:
def f(args: Any*): String = macro ???
to:
def f[A](args: A*): String = macro ???
Might alter behaviour. We experienced similar subtleties with quasiquotes.