aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/TailRec.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/transform/TailRec.scala')
-rw-r--r--src/dotty/tools/dotc/transform/TailRec.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/transform/TailRec.scala b/src/dotty/tools/dotc/transform/TailRec.scala
index 441d3ef2b..ddcdb8e4f 100644
--- a/src/dotty/tools/dotc/transform/TailRec.scala
+++ b/src/dotty/tools/dotc/transform/TailRec.scala
@@ -85,7 +85,7 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete
tree match {
case dd@DefDef(name, tparams, vparamss0, tpt, _)
if (sym.isEffectivelyFinal) && !((sym is Flags.Accessor) || (dd.rhs eq EmptyTree) || (sym is Flags.Label)) =>
- val mandatory = sym.hasAnnotation(defn.TailrecAnnotationClass)
+ val mandatory = sym.hasAnnotation(defn.TailrecAnnot)
atGroupEnd { implicit ctx: Context =>
cpy.DefDef(dd)(rhs = {
@@ -121,10 +121,10 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete
}
})
}
- case d: DefDef if d.symbol.hasAnnotation(defn.TailrecAnnotationClass) =>
+ case d: DefDef if d.symbol.hasAnnotation(defn.TailrecAnnot) =>
ctx.error("TailRec optimisation not applicable, method is neither private nor final so can be overridden", d.pos)
d
- case d if d.symbol.hasAnnotation(defn.TailrecAnnotationClass) =>
+ case d if d.symbol.hasAnnotation(defn.TailrecAnnot) =>
ctx.error("TailRec optimisation not applicable, not a method", d.pos)
d
case _ => tree