aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/DocumentationBuildingVisitor.kt5
-rw-r--r--test/src/ClassTest.kt4
2 files changed, 7 insertions, 2 deletions
diff --git a/src/DocumentationBuildingVisitor.kt b/src/DocumentationBuildingVisitor.kt
index 4289a7f7..f6a3156a 100644
--- a/src/DocumentationBuildingVisitor.kt
+++ b/src/DocumentationBuildingVisitor.kt
@@ -67,7 +67,10 @@ class DocumentationBuildingVisitor(private val worker: DeclarationDescriptorVisi
visitChildren(descriptor.getConstructors(), node)
visitChildren(descriptor.getTypeConstructor().getParameters(), node)
visitChildren(descriptor.getClassObjectDescriptor(), node)
- visitChildren(descriptor.getDefaultType().getMemberScope().getOwnDeclaredDescriptors(), node)
+ val members = descriptor.getDefaultType().getMemberScope().getAllDescriptors().filter {
+ it !is CallableMemberDescriptor || it.getKind().isReal()
+ }
+ visitChildren(members, node)
return node
}
diff --git a/test/src/ClassTest.kt b/test/src/ClassTest.kt
index 914df53b..be9a29b1 100644
--- a/test/src/ClassTest.kt
+++ b/test/src/ClassTest.kt
@@ -36,7 +36,9 @@ public class ClassTest {
assertEquals("Klass", item.name)
assertEquals("", item.doc)
assertTrue(item.details.none())
- assertEquals("<init>", item.members.single().name)
+ assertEquals(2, item.members.count())
+ assertEquals("<init>", item.members.elementAt(0).name)
+ assertEquals("fn", item.members.elementAt(1).name)
assertTrue(item.links.none())
}
}