Revert back visibility in deserialization ctor to public so inheritors can access it from other modules.

Fix instantiating of polymorphic serializer with generics.
Move context creation below as asked.
This commit is contained in:
Leonid Startsev
2019-04-30 12:55:00 +03:00
parent 3610c99163
commit 0ecf20bd62
3 changed files with 26 additions and 20 deletions
@@ -127,12 +127,12 @@ public class ConstructorCodegen {
) {
if (!canHaveDeclaredConstructors(descriptor)) return;
ConstructorContext constructorContext = context.intoConstructor(constructorDescriptor, typeMapper);
KtSecondaryConstructor constructor = (KtSecondaryConstructor) descriptorToDeclaration(constructorDescriptor);
// Synthetic constructors don't have corresponding declarations
if (constructor == null) return;
ConstructorContext constructorContext = context.intoConstructor(constructorDescriptor, typeMapper);
functionCodegen.generateMethod(
JvmDeclarationOriginKt.OtherOrigin(constructor, constructorDescriptor),
constructorDescriptor, constructorContext,