IC Mangling: Use correct java field type if the type is inline class

in old JVM BE.
 #KT-26445
This commit is contained in:
Ilmir Usmanov
2020-12-11 11:43:43 +01:00
parent 69bb65496f
commit 2b0a99b7b0
8 changed files with 127 additions and 7 deletions
@@ -0,0 +1,34 @@
// LANGUAGE: +InlineClasses
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FILE: WithInlineClass.java
import kotlin.UInt;
import org.jetbrains.annotations.Nullable;
public class WithInlineClass {
@Nullable
public static UInt UINT = null;
public static void acceptsUInt(@Nullable UInt u) {
UINT = u;
}
@Nullable
public static UInt provideUInt() {
return UINT;
}
}
// FILE: box.kt
fun box(): String {
WithInlineClass.acceptsUInt(1u)
var res = WithInlineClass.provideUInt()
if (res != 1u) return "FAIL 1 $res"
WithInlineClass.UINT = 2u
res = WithInlineClass.UINT
if (res != 2u) return "FAIL 2 $res"
return "OK"
}