Inline method: use StatementExtractor when removing unused parameters

IDEA-215429 Inline method with unused parameter causes uncompilable or unintended code

GitOrigin-RevId: d701c4a49b64202144c4d5ba80047d8f846f1767
This commit is contained in:
Tagir Valeev
2019-06-04 08:10:11 +03:00
committed by intellij-monorepo-bot
parent f1afe2cc56
commit 2ad37d8194
4 changed files with 44 additions and 9 deletions
@@ -0,0 +1,15 @@
import java.util.Set;
class Temp {
public Object foo(Set<String> bar) {
if (bar.size() < 2) {
// Inline this
bar.size(); // or online this
return null;
}
return bar;
}
}