aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/kotlin')
-rw-r--r--core/src/main/kotlin/Generation/DocumentationMerger.kt13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/src/main/kotlin/Generation/DocumentationMerger.kt b/core/src/main/kotlin/Generation/DocumentationMerger.kt
index 40a4e30d..3be6be83 100644
--- a/core/src/main/kotlin/Generation/DocumentationMerger.kt
+++ b/core/src/main/kotlin/Generation/DocumentationMerger.kt
@@ -84,12 +84,23 @@ class DocumentationMerger(
return mergedPackage
}
+ private fun mergeMemberGroupBy(it: DocumentationNode): String {
+ val signature = signatureMap[it]
+
+ if (signature != null) {
+ return signature
+ }
+
+ logger.error("Failed to find signature for $it in \n${it.allReferences().joinToString { "\n ${it.kind} ${it.to}" }}")
+ return "<ERROR>"
+ }
+
private fun mergeMemberReferences(
from: DocumentationNode,
refs: List<DocumentationReference>
): List<DocumentationReference> {
val membersBySignature: Map<String, List<DocumentationNode>> = refs.map { it.to }
- .groupBy { signatureMap[it] ?: error("Unresolved signatures: ${it.kind} ${it.name}") }
+ .groupBy(this::mergeMemberGroupBy)
val mergedMembers: MutableList<DocumentationReference> = mutableListOf()
for ((signature, members) in membersBySignature) {