From 62d47362eaa3f2b44aa4fc059f824c8a56399be8 Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Sat, 12 Oct 2024 05:46:31 -0700 Subject: [PATCH] Don't add the no-args constructor to the file (#19) This was never necessary. Co-authored-by: Jesse Wilson --- .../src/main/kotlin/app/cash/burst/kotlin/ClassSpecializer.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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) } }