Add synthetic constructors to class member scope, so they won't fly 'in the air' in the backends

This is required mainly for Native compiler since it wont't work correctly on descriptors that are not present in the class.
This commit is contained in:
Leonid Startsev
2019-04-03 14:31:47 +03:00
parent 406896eaf0
commit 6bec6e6905
16 changed files with 187 additions and 110 deletions
@@ -130,6 +130,8 @@ public class ConstructorCodegen {
ConstructorContext constructorContext = context.intoConstructor(constructorDescriptor, typeMapper);
KtSecondaryConstructor constructor = (KtSecondaryConstructor) descriptorToDeclaration(constructorDescriptor);
// Synthetic constructors don't have corresponding declarations
if (constructor == null) return;
functionCodegen.generateMethod(
JvmDeclarationOriginKt.OtherOrigin(constructor, constructorDescriptor),