diff --git a/src/main/java/com/sk89q/worldedit/expression/runtime/Function.java b/src/main/java/com/sk89q/worldedit/expression/runtime/Function.java index 82bf77471..8cc7e7fb6 100644 --- a/src/main/java/com/sk89q/worldedit/expression/runtime/Function.java +++ b/src/main/java/com/sk89q/worldedit/expression/runtime/Function.java @@ -84,7 +84,7 @@ public class Function extends Node { } @Override - public Node optimize() throws EvaluationException { + public RValue optimize() throws EvaluationException { final RValue[] optimizedArgs = new RValue[args.length]; boolean optimizable = !method.isAnnotationPresent(Dynamic.class); int position = getPosition(); diff --git a/src/main/java/com/sk89q/worldedit/expression/runtime/Node.java b/src/main/java/com/sk89q/worldedit/expression/runtime/Node.java index 11e56ed4d..4d38a12b6 100644 --- a/src/main/java/com/sk89q/worldedit/expression/runtime/Node.java +++ b/src/main/java/com/sk89q/worldedit/expression/runtime/Node.java @@ -34,7 +34,7 @@ public abstract class Node implements RValue { @Override public abstract String toString(); - public Node optimize() throws EvaluationException { + public RValue optimize() throws EvaluationException { return this; } diff --git a/src/main/java/com/sk89q/worldedit/expression/runtime/RValue.java b/src/main/java/com/sk89q/worldedit/expression/runtime/RValue.java index 33bf0f4df..299a159eb 100644 --- a/src/main/java/com/sk89q/worldedit/expression/runtime/RValue.java +++ b/src/main/java/com/sk89q/worldedit/expression/runtime/RValue.java @@ -29,5 +29,5 @@ import com.sk89q.worldedit.expression.Identifiable; public interface RValue extends Identifiable { public double getValue() throws EvaluationException; - public Node optimize() throws EvaluationException; + public RValue optimize() throws EvaluationException; } diff --git a/src/main/java/com/sk89q/worldedit/expression/runtime/Sequence.java b/src/main/java/com/sk89q/worldedit/expression/runtime/Sequence.java index 3f7f153e1..8da1db87d 100644 --- a/src/main/java/com/sk89q/worldedit/expression/runtime/Sequence.java +++ b/src/main/java/com/sk89q/worldedit/expression/runtime/Sequence.java @@ -66,7 +66,7 @@ public class Sequence extends Node { } @Override - public Node optimize() throws EvaluationException { + public RValue optimize() throws EvaluationException { List newSequence = new ArrayList(); RValue droppedLast = null;