Closed
Description
import scala.quoted._
object Macro {
inline def ff[T](x: T): T = ~impl[T]('(x))
def impl[T](x: Expr[T]): Expr[T] = x
}
fails with
3 | inline def ff[T](x: T): T = ~impl[T]('(x))
| ^
| access to type T from wrong staging level:
| - the definition is at level 1,
| - but the access is at level 0.
|
| The access would be accepted with the right type tag, but
| no implicit argument of type scala.quoted.Type[T] was found
But if we add the implicit quoted.Type[T]
it fails with
3 | inline def ff[T: Type](x: T): T = ~impl[T]('(x))
| ^
| access to value evidence$1 from wrong staging level:
| - the definition is at level 1,
| - but the access is at level -1.