Closed
Description
Compiler version
3.3.0-RC3
Minimized code
import scala.quoted.*
transparent inline def thing =
${ thingImpl }
def thingImpl(using Quotes): Expr[Any] =
'{
def makeThing: { def me: this.type } = ???
makeThing
}
Output
access to <refinement>.this from wrong staging level:
- the definition is at level 0,
- but the access is at level 1.
Expectation
I think this should compile.
I know that self reference in refinement is deprecated but I haven't figured out another way to refer to the same type, especially since cyclic type references are illegal which is annoying.
I can't figure out how to do this with the Quotes
API either. Refinement
doesn't take a symbol so there is nothing to give to This
.