Skip to content

Quoted expression in annotations are not reified #7123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
liufengyun opened this issue Aug 28, 2019 · 1 comment
Closed

Quoted expression in annotations are not reified #7123

liufengyun opened this issue Aug 28, 2019 · 1 comment

Comments

@liufengyun
Copy link
Contributor

minimized code

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}
}

The code '{4} stays unchanged until the backend, as can be seen from -Xprint:all.

expectation

I'm not sure if this is a bug, as annotations do not have runtime semantics.

Founded from #7053.

@nicolasstucki
Copy link
Contributor

Duplicate of #7121

@nicolasstucki nicolasstucki marked this as a duplicate of #7121 Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants