Forward compatibility hacks for Result.{success, failure}
Don't mangled functions annotated with @JvmName.
Annotate 'Result.success' and 'Result.failure' with @JvmName and
@Suppress("INAPPLICABLE_JVM_NAME").
NB this would require bootstrap.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +InlineClasses -MangleClassMembersReturningInlineClasses
|
||||
// WITH_RUNTIME
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
inline class S(val x: String)
|
||||
|
||||
class Test {
|
||||
@Suppress("INAPPLICABLE_JVM_NAME")
|
||||
@JvmName("getO")
|
||||
fun getOK() = S("OK")
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val t = Test()
|
||||
return t.getOK().x
|
||||
}
|
||||
Reference in New Issue
Block a user