From d6a03c99d55fc33f4ea3c243cd822ed688e633b5 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Thu, 28 Jul 2022 01:47:35 -0700 Subject: [PATCH] Add VBAR per eagle-eyed review --- src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index 01bfd755f041..2b455e38e17f 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1770,7 +1770,7 @@ abstract class RefChecks extends Transform { // Parser adds suppressing attachment on `if (b) expr` when user has `-Wnonunit-if:false`. def checkInterestingShapes(t: Tree): Boolean = t match { - case If(_, thenpart, elsepart) => checkInterestingShapes(thenpart) | checkInterestingShapes(elsepart) // strict or + case If(_, thenpart, elsepart) => checkInterestingShapes(thenpart) || checkInterestingShapes(elsepart) // either or //case Block(_, Apply(label, Nil)) if label.symbol != null && nme.isLoopHeaderLabel(label.symbol.name) => false case Block(_, res) => checkInterestingShapes(res) case Match(_, cases) => cases.exists(k => checkInterestingShapes(k.body))