From fc30a08beb509a03112298a6dd52c5001a2c6a53 Mon Sep 17 00:00:00 2001 From: Paweł Marks Date: Fri, 20 Mar 2020 12:19:47 +0100 Subject: Add missing flatmap and remove unnecessary cast making tests fail --- .../src/main/kotlin/converters/KotlinToJavaConverter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt index ce41562b..6de3f121 100644 --- a/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt +++ b/plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt @@ -33,9 +33,9 @@ internal fun DPackage.asJava(): DPackage { constructors = emptyList(), functions = ( nodes.filterIsInstance() - .map { it.javaAccessors() } + + .flatMap { it.javaAccessors() } + nodes.filterIsInstance() - .map { it.asJava(syntheticClassName) }) as List, // TODO: methods are static and receiver is a param + .map { it.asJava(syntheticClassName) }), // TODO: methods are static and receiver is a param classlikes = emptyList(), sources = PlatformDependent.empty(), visibility = PlatformDependent( -- cgit