9dd8eda1c9
Library methods such as 'listOf' are resolved to have the package fragments as their parents, but JVM expects their containing file classes as parents. This fix generates those file classes and uses them as parent replacements for such library methods.
22 lines
474 B
Kotlin
Vendored
22 lines
474 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
// WITH_REFLECT
|
|
|
|
import java.io.*
|
|
import kotlin.test.*
|
|
|
|
data class Foo(val value: String) : Serializable
|
|
|
|
fun box(): String {
|
|
val baos = ByteArrayOutputStream()
|
|
val oos = ObjectOutputStream(baos)
|
|
oos.writeObject(Foo("abacaba")::value)
|
|
oos.close()
|
|
|
|
val bais = ByteArrayInputStream(baos.toByteArray())
|
|
val ois = ObjectInputStream(bais)
|
|
assertEquals(Foo("abacaba")::value, ois.readObject())
|
|
ois.close()
|
|
|
|
return "OK"
|
|
}
|