diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-14 14:30:57 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-14 15:18:52 -0800 |
commit | 61f70e48cecddf27fba162c165dfaf712c84278c (patch) | |
tree | 5927d6f00e043dc95e7609ba38e3d57484ebffd5 /test/files/neg/t6375.check | |
parent | ebdc0ff73b533d2b625a919d0bb57dbe94430c02 (diff) | |
download | scala-61f70e48cecddf27fba162c165dfaf712c84278c.tar.gz scala-61f70e48cecddf27fba162c165dfaf712c84278c.tar.bz2 scala-61f70e48cecddf27fba162c165dfaf712c84278c.zip |
SI-6375, warn on lost annotation.
Annotations on abstract vals which are not meta-annotated
were silently discarded. Still discarded, only less silently.
I warned on as many "lost annotation" situations as I was
reasonably able to cover without false positives.
Diffstat (limited to 'test/files/neg/t6375.check')
-rw-r--r-- | test/files/neg/t6375.check | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/files/neg/t6375.check b/test/files/neg/t6375.check new file mode 100644 index 0000000000..b94a067cbb --- /dev/null +++ b/test/files/neg/t6375.check @@ -0,0 +1,27 @@ +t6375.scala:6: warning: Annotation is unused - it can be retained with a meta-annotation such as @(Bippy @getter) + @Bippy val x1: Int // warn + ^ +t6375.scala:7: warning: Annotation is unused - it can be retained with a meta-annotation such as @(Bippy @scala.annotation.meta.field @getter) + @(Bippy @field) val x2: Int // warn + ^ +t6375.scala:9: warning: Annotation is unused - it can be retained with a meta-annotation such as @(Bippy @scala.annotation.meta.setter @getter) + @(Bippy @setter) val x4: Int // warn + ^ +t6375.scala:10: warning: Annotation is unused - it can be retained with a meta-annotation such as @(Bippy @scala.annotation.meta.param @getter) + @(Bippy @param) val x5: Int // warn + ^ +t6375.scala:20: warning: Annotation is unused - it can be retained with a meta-annotation such as @(Bippy @scala.annotation.meta.getter @field) + @(Bippy @getter) private[this] val q1: Int = 1 // warn + ^ +t6375.scala:40: warning: Annotation is unused - it can be retained with a meta-annotation such as @(Bippy @scala.annotation.meta.getter @param) + @(Bippy @getter) p2: Int, // warn + ^ +t6375.scala:41: warning: Annotation is unused - it can be retained with a meta-annotation such as @(Bippy @scala.annotation.meta.setter @param) + @(Bippy @setter) p3: Int, // warn + ^ +t6375.scala:42: warning: Annotation is unused - it can be retained with a meta-annotation such as @(Bippy @scala.annotation.meta.field @param) + @(Bippy @field) p4: Int // warn + ^ +error: No warnings can be incurred under -Xfatal-warnings. +8 warnings found +one error found |