Skip to content
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

Bug with @enableIf(false) in Scala 2.13 #14

Open
ryanberckmans opened this issue Aug 15, 2019 · 1 comment
Open

Bug with @enableIf(false) in Scala 2.13 #14

ryanberckmans opened this issue Aug 15, 2019 · 1 comment

Comments

@ryanberckmans
Copy link

ryanberckmans commented Aug 15, 2019

In Scala 2.13 this code

@enableIf(false) val _ = {
  println("enableIf(false) val _")
}
@enableIf(false) val __ = {
  println("enableIf(false) val __")
}
@enableIf(false) val foo = {
  println("enableIf(false) val foo")
}

outputs enableIf(false) val _ because the annotation seems not to work for val _ as of Scala 2.13.

Tested with sbt 1.1 on java 8 hotspot and graalvm.

@ryanberckmans ryanberckmans changed the title Bug @enableIf(false) in Scala 2.13 Bug with @enableIf(false) in Scala 2.13 Aug 16, 2019
@Atry
Copy link
Collaborator

Atry commented Aug 30, 2019

In Scala 2.13, val _ is a pattern matching instead of a variable. I don't know if macro annotation is able to support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants