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
Annotations on abstract vals should emit a warning before they silently disappear #6375
Comments
Imported From: https://issues.scala-lang.org/browse/SI-6375?orig=1 |
@paulp said: |
@paulp said: |
Guillaume Massé (masgui) said (edited on Jun 12, 2015 7:31:25 PM UTC):
import scala.annotation.meta.param
import scala.annotation.StaticAnnotation
class Foo(a: Int) extends StaticAnnotation
case class Anotated(@(Foo(1) @param) p1: Int)
|
@lrytz said: |
@paulp said: Scoreboard: Implementor convenience N+1, User 0 |
Annotation on a val is by default added to the underlying field of a val.
If a val in question is abstract, there's no underlying field, so the annotation goes to waste. Writing @( @scala.annotation.meta.getter) would attach the annotation to the getter as desired, but it's not obvious.
Therefore I propose we emit a warning when an annotation is going to silently disappear.
The text was updated successfully, but these errors were encountered: