Open
Description
We should be able to constant fold s
, f
and raw
interpolator with constant inputs.
val r: "abc" = s"ab${"c"}"
This would be useful when combined with inlining
inline val x = "abc"
inline val y = s"${y}dce"
A realistic use of this feature would be with the scala.compiletime.error
method.
inline def f(x: Int) =
compiletime.error(s"Error code: $x")
f(3) // error: `Error code: 3`
This would need to happen when typing, probably in Inliner.