Fix type table serialization in DescriptorSerializer
Always serialize type table (and version requirement table) after everything else, to prevent bugs like KT-51446 where inline class underlying type was added to the type table after it has already been serialized. #KT-51446 Fixed
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +GenericInlineClassParameter
|
||||
// WITH_STDLIB
|
||||
// USE_TYPE_TABLE
|
||||
// MODULE: lib
|
||||
// FILE: A.kt
|
||||
|
||||
inline class A<T> private constructor(private val value: T) {
|
||||
val publicValue: String get() = value.toString()
|
||||
|
||||
companion object {
|
||||
fun create(c: Char): A<String> = A(c + "K")
|
||||
}
|
||||
}
|
||||
|
||||
// MODULE: main(lib)
|
||||
// FILE: B.kt
|
||||
|
||||
fun box(): String = A.create('O').publicValue
|
||||
Reference in New Issue
Block a user