Closed
Description
Compiler version
3.0.0-RC1
Minimized code
trait X[A] { def x(a: A): Boolean }
def hmm[A](using Quotes, Type[A]): Expr[Unit] = {
def sadFace(f: (Expr[A]) => Expr[Boolean]): Expr[X[A]] = '{
new X[A] {
override def x(a: A) = ${f('a)}
}
}
'{()}
}
Output
[error] 45 | override def x(a: A) = ${f('a)}
[error] | ^^
[error] |ambiguous implicit arguments: both parameter evidence$3 and parameter x$1 match type scala.quoted.Quotes
Expectation
It should compile.
The same quote/splice syntax is being used in docs here: https://dotty.epfl.ch/docs/reference/contextual/derivation-macro.html
'{ eqSum((x: T, y: T) => ${eqSumBody('x, 'y)}) }