Support unboxing of inline classes in elvis

This commit is contained in:
Mikhail Zarechenskiy
2018-02-07 06:11:15 +03:00
parent fefcddc803
commit 396cc7d02b
8 changed files with 74 additions and 3 deletions
@@ -0,0 +1,14 @@
// !LANGUAGE: +InlineClasses
inline class UInt(private val u: Int)
fun test(x: UInt?, y: UInt) {
val a = x ?: y // unbox
val b = x ?: x!! // unbox unbox
}
// 0 INVOKESTATIC UInt\$Erased.box
// 3 INVOKEVIRTUAL UInt.unbox
// 0 valueOf
// 0 intValue