[JS IR] Implement MoveTemporaryVariableDeclarationToAssignment optimization
This commit is contained in:
committed by
Space Team
parent
25f7b81d51
commit
524c475834
@@ -0,0 +1,10 @@
|
||||
inline fun jsUpper(c: Char) = c.toString().asDynamic().toUpperCase().unsafeCast<String>()
|
||||
|
||||
inline fun upper(c: Char): Char = jsUpper(c)[0]
|
||||
|
||||
// EXPECT_GENERATED_JS: function=test expect=tempVarDeclOnAssignmentTest.js
|
||||
fun test(a: Char, b: Char): String {
|
||||
return "${upper(a)}${upper(b)}"
|
||||
}
|
||||
|
||||
fun box() = test('o', 'k')
|
||||
Reference in New Issue
Block a user