From d1e90f56a8f6a753253f5d67e4654953dde2f63a Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Sat, 16 Sep 2023 21:07:26 +0200 Subject: [PATCH] Use forEach again --- .../processor/src/main/kotlin/reification/ReifyingVisitor.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kotlinpoet/processor/src/main/kotlin/reification/ReifyingVisitor.kt b/kotlinpoet/processor/src/main/kotlin/reification/ReifyingVisitor.kt index b1fef18..a678b61 100644 --- a/kotlinpoet/processor/src/main/kotlin/reification/ReifyingVisitor.kt +++ b/kotlinpoet/processor/src/main/kotlin/reification/ReifyingVisitor.kt @@ -14,7 +14,6 @@ import com.squareup.kotlinpoet.ksp.toTypeParameterResolver import com.squareup.kotlinpoet.ksp.writeTo import dev.kord.codegen.generator.packageName import dev.kord.codegen.generator.utils.getDeclaredFunctions -import dev.kord.codegen.generator.utils.isCallableType import dev.kord.codegen.generator.visitors.VisitorBase /** @@ -69,7 +68,7 @@ object ReifyingVisitor : VisitorBase() { .flatMap(KSDeclarationContainer::getDeclaredFunctions)) .filter { it.isReifiable() && !it.isConstructor() && it.isPublic() } .process() - .onEach { + .forEach { addFunction(it.reify()) } }.build()