Closed
Description
minimized code
object Test {
class Annot extends StaticAnnotation
class Quoted[T]
inline def quote[T]: Quoted[T] = ${ quoteImpl[T] }
def quoteImpl[T: Type](given qctx: QuoteContext): Expr[Quoted[T]] = '{
new Quoted[T @Annot]
}
}
produces an erroneous wrong stage
error
12 | new Quoted[T @Annot]
| ^^^^^^^^^^^^^^^^
| access to constructor Annot from wrong staging level:
| - the definition is at level 0,
| - but the access is at level 1.
expectation
Since Annot
is global this shouldn't have been a problem.