Get rid of redundant boxing when comparing inline class instances

^KT-33722: Fixed
This commit is contained in:
vladislav.grechko
2022-11-17 20:04:11 +01:00
committed by teamcity
parent e5ce32feeb
commit 5ec2f1ad92
5 changed files with 64 additions and 13 deletions
@@ -0,0 +1,17 @@
// WITH_STDLIB
// TARGET_BACKEND: JVM_IR
fun foo() {
val result = Result.success("yes!")
val other = Result.success("nope")
result == other
result != other
result.equals(other)
!result.equals(other)
}
// CHECK_BYTECODE_TEXT
// 0 INVOKESTATIC kotlin/Result.box-impl
// 4 INVOKESTATIC kotlin/Result.equals-impl0