diff --git a/sootup.java.bytecode/src/main/java/sootup/java/bytecode/frontend/Operand.java b/sootup.java.bytecode/src/main/java/sootup/java/bytecode/frontend/Operand.java index 5f185ce9224..6411bc70c4b 100644 --- a/sootup.java.bytecode/src/main/java/sootup/java/bytecode/frontend/Operand.java +++ b/sootup.java.bytecode/src/main/java/sootup/java/bytecode/frontend/Operand.java @@ -21,9 +21,7 @@ * . * #L% */ -import java.util.stream.Collectors; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; + import org.objectweb.asm.tree.AbstractInsnNode; import sootup.core.jimple.Jimple; import sootup.core.jimple.basic.Immediate; @@ -35,6 +33,10 @@ import sootup.core.jimple.common.stmt.Stmt; import sootup.core.jimple.visitor.ReplaceUseStmtVisitor; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.util.stream.Collectors; + /** * Stack operand. * @@ -67,7 +69,7 @@ class Operand { Local getOrAssignValueToStackLocal() { if (stackLocal == null) { - changeStackLocal(methodSource.newStackLocal()); + changeStackLocal(methodSource.newStackLocal().withType(value.getType())); } return stackLocal;