Skip to content

Commit

Permalink
issue #58 : invNeedsTmpVar(Invocation inv) returned false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
miho committed Aug 7, 2015
1 parent b736b86 commit 10a9447
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import eu.mihosoft.vrl.lang.model.Invocation;
import eu.mihosoft.vrl.lang.model.MethodDeclaration;
import eu.mihosoft.vrl.lang.model.Operator;
import eu.mihosoft.vrl.lang.model.ReturnStatementInvocation;
import eu.mihosoft.vrl.lang.model.Scope;
import eu.mihosoft.vrl.lang.model.ScopeInvocation;
import eu.mihosoft.vrl.lang.model.Type;
Expand Down Expand Up @@ -164,9 +165,13 @@ private boolean invNeedsTmpVar(Invocation inv) {
if (inv instanceof DeclarationInvocation) {
return false;
}

if (inv instanceof ReturnStatementInvocation) {
return false;
}

if (!(inv instanceof BinaryOperatorInvocationImpl)) {
return false;
return true;
}

BinaryOperatorInvocationImpl boi = (BinaryOperatorInvocationImpl) inv;
Expand Down

0 comments on commit 10a9447

Please sign in to comment.