Resolve constructors declared in traits and objects

It prevents exceptions and produces less red code

 #EA-68667 Fixed
This commit is contained in:
Denis Zharkov
2015-05-29 15:58:08 +03:00
parent 7f9d2e8a36
commit 70dbbd8fda
23 changed files with 179 additions and 31 deletions
@@ -1067,6 +1067,8 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
}
private void generateSecondaryConstructor(@NotNull ConstructorDescriptor constructorDescriptor) {
if (!canHaveDeclaredConstructors(descriptor)) return;
ConstructorContext constructorContext = context.intoConstructor(constructorDescriptor);
functionCodegen.generateMethod(OtherOrigin(descriptorToDeclaration(constructorDescriptor), constructorDescriptor),