Leave boxing for compareTo/areEqual methods for inline classes

Inline classes can override methods and thus introduce side effects
This commit is contained in:
Mikhail Zarechenskiy
2018-07-20 03:05:11 +03:00
parent 4e7718bfff
commit ec9d8e580e
10 changed files with 58 additions and 7 deletions

View File

@@ -20,8 +20,8 @@ fun getAndCheckInlinedInt(a: InlinedInt, b: InlinedInt) =
// @TestInlinedKt.class:
// 0 valueOf
// 0 Value
// 0 areEqual
// 0 INVOKESTATIC InlinedInt\$Erased.box
// 1 areEqual
// 2 INVOKESTATIC InlinedInt\$Erased.box
// 0 INVOKEVIRTUAL InlinedInt.unbox
// FILE: Inline.kt