You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
fails with
But if we add the implicit
quoted.Type[T]
it fails withThe text was updated successfully, but these errors were encountered: