From f0624e1937f258af408faf32293ad2af3f94fb6e Mon Sep 17 00:00:00 2001 From: Tiark Rompf Date: Mon, 29 Mar 2010 19:22:50 +0000 Subject: fixes the unfounded "name clash between inherit... fixes the unfounded "name clash between inherited members" error. review by dragos. --- .../plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala | 2 +- .../plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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, */ -- cgit v1.2.3