diff --git a/burst-kotlin-plugin/src/main/kotlin/app/cash/burst/kotlin/ClassSpecializer.kt b/burst-kotlin-plugin/src/main/kotlin/app/cash/burst/kotlin/ClassSpecializer.kt index ed6e6bf..3296025 100644 --- a/burst-kotlin-plugin/src/main/kotlin/app/cash/burst/kotlin/ClassSpecializer.kt +++ b/burst-kotlin-plugin/src/main/kotlin/app/cash/burst/kotlin/ClassSpecializer.kt @@ -145,7 +145,7 @@ internal class ClassSpecializer( superConstructor: IrConstructor, arguments: List, ) { - val constructor = original.addConstructor { + original.addConstructor { initDefaults(original) }.apply { irConstructorBody(pluginContext) { statements -> @@ -160,7 +160,5 @@ internal class ClassSpecializer( } } } - - originalParent.addDeclaration(constructor) } }