Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/kt44867.kt
T
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00

14 lines
541 B
Kotlin
Vendored

// WITH_STDLIB
// IGNORE_BACKEND: JVM
// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: FAKE_OVERRIDE_ISSUES
// On wasm this will produce conflicting return types, Result.<get-value> will return Any but we will try to interpret it as String.
// Before wasm native strings this worked by chance because we added unbox intrinsic for strings.
open class BaseWrapper<T>(val response: T)
class Wrapper(result: Result<String>) : BaseWrapper<Result<String>>(result)
fun box(): String {
return Wrapper(Result.success("OK")).response.getOrThrow()
}