Add KotlinType info about this inside inline class

This commit is contained in:
Mikhail Zarechenskiy
2018-02-08 14:18:17 +03:00
parent c86d3e354b
commit 22b9c25dd0
9 changed files with 81 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
// !LANGUAGE: +InlineClasses
inline class UInt(val a: Int) {
fun test() {
takeNullable(this) // box
takeAnyInside(this) // box
takeAnyInside(this.a) // box int
}
fun takeAnyInside(a: Any) {}
}
fun takeNullable(a: UInt?) {}
// 2 INVOKESTATIC UInt\$Erased.box
// 0 INVOKEVIRTUAL Foo.unbox
// 1 valueOf
// 0 intValue