Skip to content

Commit

Permalink
sense++
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlogic committed Jan 27, 2024
1 parent ec52510 commit 103c46d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/arb/expressions/nodes/unary/When.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public static <D, R, F extends Function<D, R>> Node<D, R, F> evaluate(Expression
Node<D, R, F>
evaluateCondition(Expression<D, R, F> expression, int depth, TreeMap<Integer, Node<D, R, F>> cases)
{
Node<D, R, F> defaultValue = null;
Node<D, R, F> value = null;

Node<D, R, F> node = expression.evaluate(depth + 1);
if (!(node instanceof Variable))
Expand All @@ -179,13 +179,13 @@ public static <D, R, F extends Function<D, R>> Node<D, R, F> evaluate(Expression

if ("else".equals(variable.reference.name))
{
defaultValue = evaluateDefaultValue(expression, depth);
value = evaluateDefaultValue(expression, depth);
}
else
{
evaluateConditionalValue(expression, depth, cases, variable);
}
return defaultValue;
return value;
}

private static <D, F extends Function<D, R>, R>
Expand Down

0 comments on commit 103c46d

Please sign in to comment.