Fix version requirement serialization for nested classes
Use the version requierement table of the outer DescriptorSerializer instance when serializing metadata for a class. Pass parent serializer to DescriptorSerializer.create to make sure the correct table is used. Serialize nested classes before the outer class in JS and common code, to make sure requirements are not lost. Also, split VersionRequirementTest to JVM and JS #KT-25120 In Progress
This commit is contained in:
@@ -96,7 +96,7 @@ fun JavaClassDescriptor.convertToProto(): SerializedJavaClassWithSource {
|
||||
|
||||
val extension = JavaClassesSerializerExtension()
|
||||
val classProto = try {
|
||||
DescriptorSerializer.create(this, extension).classProto(this).build()
|
||||
DescriptorSerializer.create(this, extension, null).classProto(this).build()
|
||||
} catch (e: Exception) {
|
||||
throw IllegalStateException(
|
||||
"Error during writing proto for descriptor: ${DescriptorRenderer.DEBUG_TEXT.render(this)}\n" +
|
||||
|
||||
Reference in New Issue
Block a user