chore: rename method and remove FIXME comment.
This commit is contained in:
+2
-4
@@ -18,8 +18,6 @@ import org.jetbrains.kotlin.ir.types.*
|
||||
import org.jetbrains.kotlin.ir.util.isPrimitiveArray
|
||||
import org.jetbrains.kotlin.ir.util.patchDeclarationParents
|
||||
import org.jetbrains.kotlin.ir.util.render
|
||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid
|
||||
import org.jetbrains.kotlin.ir.visitors.acceptChildrenVoid
|
||||
|
||||
|
||||
// Copied and adapted from Kotlin/Native
|
||||
@@ -195,14 +193,14 @@ class AutoboxingTransformer(context: JsCommonBackendContext) : AbstractValueUsag
|
||||
}
|
||||
|
||||
override fun visitCall(expression: IrCall): IrExpression {
|
||||
if (expression.symbol == irBuiltIns.eqeqeqSymbol && expression.isAllArgumentsHaveType(irBuiltIns.charType)) {
|
||||
if (expression.symbol == irBuiltIns.eqeqeqSymbol && expression.allArgumentsHaveType(irBuiltIns.charType)) {
|
||||
return expression.apply { transformChildrenVoid() }
|
||||
} else {
|
||||
return super.visitCall(expression)
|
||||
}
|
||||
}
|
||||
|
||||
private fun IrCall.isAllArgumentsHaveType(type: IrType): Boolean {
|
||||
private fun IrCall.allArgumentsHaveType(type: IrType): Boolean {
|
||||
for (i in 0 until valueArgumentsCount) {
|
||||
if (getValueArgument(i)?.type != type) {
|
||||
return false
|
||||
|
||||
@@ -7,7 +7,6 @@ fun box(): String {
|
||||
assertEquals(false, 'A' == 'B')
|
||||
assertEquals(false, ('A' as Any) == (65 as Any))
|
||||
|
||||
// FIXME(KT-50157)
|
||||
assertEquals(true, 'A' === 'A')
|
||||
assertEquals(false, 'A' === 'B')
|
||||
assertEquals(false, ('A' as Any) === (65 as Any))
|
||||
|
||||
Reference in New Issue
Block a user