diff options
Diffstat (limited to 'src/continuations/plugin')
-rw-r--r-- | src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala index 6acc685dc2..a1112fa3c8 100644 --- a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala +++ b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala @@ -380,7 +380,11 @@ abstract class CPSAnnotationChecker extends CPSUtils { * for a tree. All this should do is add annotations. */ override def addAnnotations(tree: Tree, tpe: Type): Type = { - if (!cpsEnabled) return tpe + if (!cpsEnabled) { + if (tpe.hasAnnotation(MarkerCPSTypes)) + global.reporter.error(tree.pos, "this code must be compiled with the Scala continuations plugin enabled") + return tpe + } // if (tree.tpe.hasAnnotation(MarkerCPSAdaptPlus)) // println("addAnnotation " + tree + "/" + tpe) |