blob: daddc9d181fec5ff3f558b163e9b217a07d30157 [file]
// NATIVE and WASM failure reasons see in `result.kt`
// JS_IR error: <main> @ /box.kt:24:12: Constructor 'Result.<init>' can not be called: No constructor found for symbol 'kotlin/Result.<init>|-8731461708390519279[0]'
// DONT_TARGET_EXACT_BACKEND: NATIVE
// IGNORE_BACKEND: WASM_JS, WASM_WASI, JS_IR, JS_IR_ES6
// This test uses 'kotlin' package, which is being moved in Android tests
// IGNORE_BACKEND: ANDROID
// IGNORE_IR_DESERIALIZATION_TEST: JS_IR NATIVE
// ^^^ There is unlinked call of Result.<init> after deserialization. 'ValueClasses' language feature is still unstable.
// WASM_FAILS_IN_SINGLE_MODULE_MODE
// ALLOW_KOTLIN_PACKAGE
// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +JvmInlineMultiFieldValueClasses, +GenericInlineClassParameter
// FILE: result.kt
package kotlin
OPTIONAL_JVM_INLINE_ANNOTATION
value class Result<T>(val value: T)
// FILE: box.kt
fun box(): String {
return Result("OK").value
}