From 71d20312e9d9797f416eba46025c54adee045ce4 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Sat, 21 Jul 2012 08:51:50 +0200 Subject: SI-6089 pt2: _ is tailpos in `_ || _` and `_ && _` pull #939 made tail position detection for matches more strict to fix SI-6089, but became too strict: need to include the tail positions `_` in `_ || _` and `_ && _`. --- src/compiler/scala/tools/nsc/transform/TailCalls.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/scala/tools/nsc/transform/TailCalls.scala b/src/compiler/scala/tools/nsc/transform/TailCalls.scala index d5bbc578fc..492273dfdc 100644 --- a/src/compiler/scala/tools/nsc/transform/TailCalls.scala +++ b/src/compiler/scala/tools/nsc/transform/TailCalls.scala @@ -397,6 +397,9 @@ abstract class TailCalls extends Transform { case Apply(fun, arg :: Nil) if hasSynthCaseSymbol(fun) && tailLabels(fun.symbol) => traverse(arg) + case Apply(fun, args) if (fun.symbol == Boolean_or || fun.symbol == Boolean_and) => + traverseTrees(args) + // a translated casedef case LabelDef(_, _, body) if hasSynthCaseSymbol(tree) => traverse(body) -- cgit v1.2.3