diff options
author | Paweł Marks <pmarks@virtuslab.com> | 2020-03-20 12:19:47 +0100 |
---|---|---|
committer | Paweł Marks <pmarks@virtuslab.com> | 2020-03-20 12:19:47 +0100 |
commit | fc30a08beb509a03112298a6dd52c5001a2c6a53 (patch) | |
tree | 03035be08fc09d435e0540918220d57b81cd0516 /plugins/kotlin-as-java/src/main | |
parent | 96c6e9b404b83e7e86cc81959dfffc1a44cd40b7 (diff) | |
download | dokka-fc30a08beb509a03112298a6dd52c5001a2c6a53.tar.gz dokka-fc30a08beb509a03112298a6dd52c5001a2c6a53.tar.bz2 dokka-fc30a08beb509a03112298a6dd52c5001a2c6a53.zip |
Add missing flatmap and remove unnecessary cast making tests fail
Diffstat (limited to 'plugins/kotlin-as-java/src/main')
-rw-r--r-- | plugins/kotlin-as-java/src/main/kotlin/converters/KotlinToJavaConverter.kt | 4 |
1 files 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<DProperty>() - .map { it.javaAccessors() } + + .flatMap { it.javaAccessors() } + nodes.filterIsInstance<DFunction>() - .map { it.asJava(syntheticClassName) }) as List<DFunction>, // 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( |