[JS IR] Materialize all JsCompositeBlock

^KT-60667 Fixed
This commit is contained in:
Alexander Korepanov
2023-07-31 17:26:51 +02:00
committed by Space Team
parent cd840997b1
commit d0e4515ec1
7 changed files with 164 additions and 1 deletions
@@ -828,7 +828,7 @@ public class JsToStringGenerationVisitor extends JsVisitor {
}
private static JsStatement materialize(JsStatement statement) {
return statement instanceof JsCompositeBlock && ((JsCompositeBlock) statement).getStatements().size() > 1
return statement instanceof JsCompositeBlock
? new JsBlock(statement)
: statement;
}