Closed
Description
Given the following function definition
def f[A: Type](e: Expr[A]): Expr[A] = e match {
case '{ $e2 } => e2
}
we will be warned that
[warn] 35 | case '{ $e2 } => e2
[warn] | ^^^^^^^^
[warn] |Canceled splice directly inside a quote. '{ ${ XYZ } } is equivalent to XYZ.
but this is not true. Performing pattern matching normalizes the scrutinee, which can be observable by user code (for instance using the reflection API).
We could remove the warning for pattern matching. While this improves the situation that the compiler no longer lies to us,
IMO it only defers the real problem: Non-normalized trees are observable by the user. I would thus prefer a solution that makes the equivalence statement hold, instead.