EnsureCodeBlockImpl: support try splitting; used in AddAssertStatementFix

Fixes IDEA-230023 Applying `Assert != null` in try-with-resources leads to uncompilable code

GitOrigin-RevId: 3dc141010420570c061849287adaeb0fccbcf1f4
This commit is contained in:
Tagir Valeev
2020-01-10 11:37:34 +00:00
committed by intellij-monorepo-bot
parent b6c8e10a79
commit 1bb6f68f9b
12 changed files with 149 additions and 30 deletions
@@ -3,8 +3,12 @@ class A{
void test(){
Object container = null;
Runnable r = () -> {
assert container != null;
container == null ? container.toString() : "";
if (container == null) {
assert container != null;
container.toString();
} else {
"";
}
};
}
}