diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-08-21 18:11:07 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-08-21 18:11:07 -0700 |
commit | f315253ff7c5f4074f61a079308db45452be75db (patch) | |
tree | 65a77a76f335465a96fe71decb3d2b91f75c8b2c /src/compiler | |
parent | a1aaab2673016d65c1919c37fe24417f2cb0cb91 (diff) | |
parent | 46f17f114bf261dc8757b5b876da50d53bb31172 (diff) | |
download | scala-f315253ff7c5f4074f61a079308db45452be75db.tar.gz scala-f315253ff7c5f4074f61a079308db45452be75db.tar.bz2 scala-f315253ff7c5f4074f61a079308db45452be75db.zip |
Merge pull request #2810 from xeno-by/topic/compile-time-only
@compileTimeOnly: moved to scala-library.jar, got some fixes
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 66dff792b6..b8b06f3082 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1419,6 +1419,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)) } @@ -1653,6 +1654,7 @@ abstract class RefChecks extends InfoTransform with scala.reflect.internal.trans tree case Ident(name) => + checkCompileTimeOnly(tree.symbol, tree.pos) transformCaseApply(tree, if (name != nme.WILDCARD && name != tpnme.WILDCARD_STAR) { assert(sym != NoSymbol, "transformCaseApply: name = " + name.debugString + " tree = " + tree + " / " + tree.getClass) //debug |