KAPT+IR: Support secondary constructors

This commit is contained in:
Mikhael Bogdanov
2022-03-08 11:33:45 +01:00
parent 3b2a318c7d
commit ceedad40f3
3 changed files with 4 additions and 5 deletions
@@ -156,8 +156,10 @@ class BodyGenerator(
generateDelegatingConstructorCall(irBlockBody, ktConstructor)
ktConstructor.bodyExpression?.let { ktBody ->
createStatementGenerator().generateStatements(ktBody.statements, irBlockBody)
if (context.configuration.generateBodies) {
ktConstructor.bodyExpression?.let { ktBody ->
createStatementGenerator().generateStatements(ktBody.statements, irBlockBody)
}
}
return irBlockBody
@@ -1,5 +1,3 @@
// IGNORE_BACKEND: JVM_IR
interface Named {
val name: String?
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JVM_IR
// CORRECT_ERROR_TYPES
package secondary