Skip to content

Commit

Permalink
Fix unnecessary casts with instanceof
Browse files Browse the repository at this point in the history
  • Loading branch information
coehlrich committed Sep 5, 2023
1 parent 77b840f commit db9dea9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import org.jetbrains.java.decompiler.struct.match.MatchNode;
import org.jetbrains.java.decompiler.util.IntHelper;
import org.jetbrains.java.decompiler.util.InterpreterUtil;
import org.jetbrains.java.decompiler.util.TextBuffer;
import org.jetbrains.java.decompiler.util.Typed;
import org.jetbrains.java.decompiler.util.collections.ListStack;
import org.jetbrains.java.decompiler.util.TextBuffer;
import org.jetbrains.java.decompiler.util.collections.SFormsFastMapDirect;

import java.util.*;
Expand Down Expand Up @@ -293,6 +293,11 @@ public VarType getInferredExprType(VarType upperBound) {
return type1;
}

return getExprType();
} else if (funcType == FunctionType.INSTANCEOF) {
for (Exprent oper : lstOperands) {
oper.getInferredExprType(null);
}
return getExprType();
}

Expand Down

0 comments on commit db9dea9

Please sign in to comment.