Call factory method for primary constructors of inner classes
We might want to add 'init' blocks later, so now, for the sake of binary compatibility with 1.3-RC binaries, we have to generate these 'constructor' calls. Note that in some tests inline class boxing is no longer redundant, because resulting value is passed to 'constructor' as an argument.
This commit is contained in:
Vendored
+1
@@ -12,6 +12,7 @@ fun f() {
|
||||
|
||||
// @TestKt.class:
|
||||
// 0 INVOKESTATIC UInt\$Erased.box
|
||||
// 0 INVOKESTATIC UInt\.box
|
||||
// 0 INVOKEVIRTUAL UInt.unbox
|
||||
// 0 valueOf
|
||||
// 0 intValue
|
||||
Vendored
+1
@@ -16,6 +16,7 @@ fun test() {
|
||||
|
||||
// @TestKt.class:
|
||||
// 0 INVOKESTATIC Result\$Erased.box
|
||||
// 2 INVOKESTATIC Result\.box
|
||||
// 0 INVOKEVIRTUAL Result.unbox
|
||||
|
||||
// 2 valueOf
|
||||
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
// FILE: Z.kt
|
||||
inline class Z(val x: Int)
|
||||
|
||||
// FILE: test.kt
|
||||
fun testZ() = Z(42)
|
||||
|
||||
// @TestKt.class:
|
||||
// 1 INVOKESTATIC Z\.constructor \(I\)I
|
||||
Vendored
+1
@@ -27,6 +27,7 @@ fun test(asInt: Result<Int>, asString: Result<String>, asResult: Result<Result<I
|
||||
|
||||
// @TestKt.class:
|
||||
// 0 INVOKESTATIC Result\$Erased.box
|
||||
// 0 INVOKESTATIC Result\.box
|
||||
// 3 INVOKEVIRTUAL Result.unbox
|
||||
|
||||
// 0 valueOf
|
||||
|
||||
Reference in New Issue
Block a user