diff options
-rw-r--r-- | src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala | 2 | ||||
-rw-r--r-- | src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala index 3b99eb2008..70c1bae221 100644 --- a/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala +++ b/src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala @@ -381,7 +381,7 @@ abstract class CPSAnnotationChecker extends CPSUtils { override def addAnnotations(tree: Tree, tpe: Type): Type = { if (!cpsEnabled) { - if (tpe.hasAnnotation(MarkerCPSTypes)) + if (tpe.annotations.nonEmpty && tpe.hasAnnotation(MarkerCPSTypes)) global.reporter.error(tree.pos, "this code must be compiled with the Scala continuations plugin enabled") return tpe } diff --git a/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala b/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala index 15adfa7d82..6da56f93d4 100644 --- a/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala +++ b/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala @@ -28,6 +28,8 @@ abstract class SelectiveCPSTransform extends PluginComponent with protected def newTransformer(unit: CompilationUnit): Transformer = new CPSTransformer(unit) + /** This class does not change linearization */ + override def changesBaseClasses = false /** - return symbol's transformed type, */ |