[JS IR] Optimize JS AST for closures

^KT-58891 Fixed
This commit is contained in:
Alexander Korepanov
2023-07-06 22:17:50 +02:00
committed by Space Team
parent 524c475834
commit a588e75c11
9 changed files with 136 additions and 2 deletions
@@ -0,0 +1,15 @@
function test$lambda($x) {
return function () {
var tmp0_elvis_lhs = $x;
var tmp;
if (tmp0_elvis_lhs == null) {
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
return 'OK';
} else {
tmp = tmp0_elvis_lhs;
}
var z = tmp;
return 'Fail 1: ' + z;
};
}