Do not serialize constructors for anonymous objects
The only client of this data is reflection, and since anonymous objects do not have constructors in the source code, they shouldn't in reflection as well #KT-20442 Fixed
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ class DescriptorSerializer private constructor(
|
||||
}
|
||||
}
|
||||
|
||||
if (classDescriptor.kind != ClassKind.ENUM_ENTRY) {
|
||||
if (!DescriptorUtils.isAnonymousObject(classDescriptor) && classDescriptor.kind != ClassKind.ENUM_ENTRY) {
|
||||
for (descriptor in classDescriptor.constructors) {
|
||||
builder.addConstructor(constructorProto(descriptor))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user