Skip to content

Quoted expressions in annotations #7121

Closed
@nicolasstucki

Description

@nicolasstucki

@nicolasstucki The printing of the following program shows that the '{4} in the annotation is not reified during compilation:

import scala.quoted._

class annot[T: Type](x: Expr[T]) extends scala.annotation.Annotation

class Test()(implicit qtx: QuoteContext) {
  @annot('{4})
  def foo(str: String) = '{4}
}

I'm not sure if it's a bug or not, as annotations don't have runtime semantics.

Originally posted by @liufengyun in #7053 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions