summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-08-10 14:58:09 +0200
committerEugene Burmako <xeno.by@gmail.com>2013-08-15 08:06:22 +0200
commit4ca45cb4c14595d491cc0cfc509fa88fb4dd5619 (patch)
treef5eff9c3b1d4e54a6257ee6a645011b86322f511 /src
parent840ad7656456f014135c2a5e31e0d9ffd63625bd (diff)
downloadscala-4ca45cb4c14595d491cc0cfc509fa88fb4dd5619.tar.gz
scala-4ca45cb4c14595d491cc0cfc509fa88fb4dd5619.tar.bz2
scala-4ca45cb4c14595d491cc0cfc509fa88fb4dd5619.zip
@compileTimeOnly now works for annotations
http://docs.scala-lang.org/overviews/macros/annotations.html say sincere "thank you!".
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/RefChecks.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
index 1b6963b598..782a2880c2 100644
--- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
@@ -1414,6 +1414,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans
private def applyRefchecksToAnnotations(tree: Tree): Unit = {
def applyChecks(annots: List[AnnotationInfo]) = {
+ annots foreach (annot => checkCompileTimeOnly(annot.atp.typeSymbol, annot.pos))
checkAnnotations(annots map (_.atp), tree)
transformTrees(annots flatMap (_.args))
}