-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Some givens ignore @compileTimeOnly
annotation
#17002
Comments
The second failing test is due to the method import scala.annotation.compileTimeOnly
sealed trait Test
object Test:
@compileTimeOnly("Error")
given Test() |
The first example works as expected if The reason it does not work with |
I'm not sure that we can replace Probably, all |
This sounds to me like the more principled way to control where In any case, I would also advocate keeping the possibility to add a customized message to the compiler error. |
We could use |
Compiler version
3.3.1-RC1-bin-20230216-2507577-NIGHTLY
Minimized code
Some givens ignore their
@compileTimeOnly
annotation and let code compile when it should error. See comments in the code below:EDIT: A further observation (that may be related): The following code fails to compile but should IMHO:
Error message:
The text was updated successfully, but these errors were encountered: