Skip to content

Commit 150734c

Browse files
committed
Add check on emptiness
1 parent 8057abb commit 150734c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/signatures/KotlinSignatureProvider.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,12 @@ public class KotlinSignatureProvider(
483483
type.projections
484484

485485
punctuation("(")
486+
if(args.isEmpty()) {
487+
contentBuilder.logger.warn("Functional type should have at least one argument in ${type.dri}")
488+
text("ERROR CLASS: functional type should have at least one argument in ${type.dri}")
489+
return@contentFor
490+
}
491+
486492
args.subList(0, args.size - 1).forEachIndexed { i, arg ->
487493
signatureForProjection(arg)
488494
if (i < args.size - 2) punctuation(", ")

0 commit comments

Comments
 (0)