Skip to content

Commit 242f5db

Browse files
committed
Fix a couple of warnings.
1 parent 94ac9e7 commit 242f5db

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/dotty/tools/dotc/transform/InterceptedMethods.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import dotty.tools.dotc.ast.{untpd, tpd}
2222
import dotty.tools.dotc.core.Constants.Constant
2323
import dotty.tools.dotc.core.Types.MethodType
2424
import dotty.tools.dotc.core.Names.Name
25-
import dotty.runtime.LazyVals
2625
import scala.collection.mutable.ListBuffer
2726
import dotty.tools.dotc.core.Denotations.SingleDenotation
2827
import dotty.tools.dotc.core.SymDenotations.SymDenotation

src/dotty/tools/dotc/transform/TailRec.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,16 @@ class TailRec extends MiniPhaseTransform with DenotTransformer with FullParamete
338338
assert(false, "We should never have gotten inside a pattern")
339339
tree
340340

341+
case t @ DefDef(_, _, _, _, _) =>
342+
t // todo: could improve to handle DefDef's with a label flag calls to which are in tail position
343+
341344
case ValDef(_, _, _) | EmptyTree | Super(_, _) | This(_) |
342-
Literal(_) | TypeTree(_) | DefDef(_, _, _, _, _) | TypeDef(_, _) =>
345+
Literal(_) | TypeTree(_) | TypeDef(_, _) =>
343346
tree
344347

345348
case Return(expr, from) =>
346349
tpd.cpy.Return(tree)(noTailTransform(expr), from)
347-
case t: DefDef =>
348-
t // todo: could improve to handle DefDef's with a label flag calls to which are in tail position
350+
349351
case _ =>
350352
super.transform(tree)
351353
}

0 commit comments

Comments
 (0)