From 3991a5737b8a14a376d005a0e9d216eeafef7d92 Mon Sep 17 00:00:00 2001 From: Manos Koukoutos <emmanouil.koukoutos@epfl.ch> Date: Fri, 22 Jan 2016 15:58:45 +0100 Subject: [PATCH] Remove excessive parens form Choose --- src/main/scala/leon/purescala/PrettyPrinter.scala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/scala/leon/purescala/PrettyPrinter.scala b/src/main/scala/leon/purescala/PrettyPrinter.scala index 82f41e876..7bebde2f8 100644 --- a/src/main/scala/leon/purescala/PrettyPrinter.scala +++ b/src/main/scala/leon/purescala/PrettyPrinter.scala @@ -649,11 +649,10 @@ class PrettyPrinter(opts: PrinterOptions, protected def requiresParentheses(ex: Tree, within: Option[Tree]): Boolean = (ex, within) match { case (pa: PrettyPrintable, _) => pa.printRequiresParentheses(within) case (_, None) => false - case (_, Some(_: Ensuring)) => false - case (_, Some(_: Assert)) => false - case (_, Some(_: Require)) => false - case (_, Some(_: Definition)) => false - case (_, Some(_: MatchExpr | _: MatchCase | _: Let | _: LetDef | _: IfExpr | _ : CaseClass | _ : Lambda)) => false + case (_, Some( + _: Ensuring | _: Assert | _: Require | _: Definition | _: MatchExpr | + _: MatchCase | _: Let | _: LetDef | _: IfExpr | _ : CaseClass | _ : Lambda | _ : Choose + )) => false case (ex: StringConcat, Some(_: StringConcat)) => false case (b1 @ BinaryMethodCall(_, _, _), Some(b2 @ BinaryMethodCall(_, _, _))) if precedence(b1) > precedence(b2) => false case (BinaryMethodCall(_, _, _), Some(_: FunctionInvocation)) => true -- GitLab