mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
29 lines
558 B
Kotlin
Vendored
29 lines
558 B
Kotlin
Vendored
// LANGUAGE: +InlineClasses
|
|
// TARGET_BACKEND: JVM
|
|
// WITH_RUNTIME
|
|
|
|
// FILE: WithInlineClass.java
|
|
|
|
import kotlin.UInt;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public class WithInlineClass {
|
|
private static UInt UINT = null;
|
|
|
|
public static void acceptsUInt(@NotNull UInt u) {
|
|
UINT = u;
|
|
}
|
|
|
|
@NotNull
|
|
public static UInt provideUInt() {
|
|
return UINT;
|
|
}
|
|
}
|
|
|
|
// FILE: box.kt
|
|
|
|
fun box(): String {
|
|
WithInlineClass.acceptsUInt(1u)
|
|
val res = WithInlineClass.provideUInt()
|
|
return if (res == 1u) "OK" else "FAIL $res"
|
|
} |