From 86790d1486c4b55b520858ca19dade8651061dcb Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 24 Dec 2019 17:19:49 +0100 Subject: [PATCH] ZoneCodeGenerator: Fix not respecting when in an operation the second operand should be calculated first but the precedence is the same --- src/ZoneCodeGenerator/Domain/Evaluation/Operation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ZoneCodeGenerator/Domain/Evaluation/Operation.cs b/src/ZoneCodeGenerator/Domain/Evaluation/Operation.cs index 312dfafb..61f46743 100644 --- a/src/ZoneCodeGenerator/Domain/Evaluation/Operation.cs +++ b/src/ZoneCodeGenerator/Domain/Evaluation/Operation.cs @@ -14,7 +14,7 @@ namespace ZoneCodeGenerator.Domain.Evaluation public IEvaluation Operand2 { get; } public bool Operand2NeedsParenthesis => Operand2 is Operation operation2 && - operation2.OperationType.Precedence > OperationType.Precedence; + operation2.OperationType.Precedence >= OperationType.Precedence; public OperationType OperationType { get; }