Desugar constructor call of inline class to the underlying value
Also add information about KotlinType to the constant stack values
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class AsInt(val value: Int)
|
||||
inline class AsAny(val value: Any)
|
||||
|
||||
fun takeAny(a: Any) {}
|
||||
|
||||
fun test() {
|
||||
takeAny(AsInt(123)) // box
|
||||
takeAny(AsAny(123)) // box int, box inline class
|
||||
}
|
||||
|
||||
// 1 INVOKESTATIC AsInt\$Erased.box
|
||||
// 0 INVOKEVIRTUAL AsInt.unbox
|
||||
|
||||
// 1 INVOKESTATIC AsAny\$Erased.box
|
||||
// 0 INVOKEVIRTUAL AsAny.unbox
|
||||
|
||||
// 1 valueOf
|
||||
// 0 intValue
|
||||
Reference in New Issue
Block a user