diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2017-02-24 14:12:27 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2017-02-24 14:12:27 +0100 |
commit | 386f3a88f24cc9ce032899354188dfc4d54ad0a8 (patch) | |
tree | 1d44366d0692dbd0c092f95352e8051661b337b8 /core/src/main | |
parent | c8bef5fdac93e62ea3e367012769d34fa838ae7a (diff) | |
download | dokka-386f3a88f24cc9ce032899354188dfc4d54ad0a8.tar.gz dokka-386f3a88f24cc9ce032899354188dfc4d54ad0a8.tar.bz2 dokka-386f3a88f24cc9ce032899354188dfc4d54ad0a8.zip |
Don't show member extensions defined in other classes in the list of members for a type
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/kotlin/Kotlin/DocumentationBuilder.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt index d9561980..2ab43fa1 100644 --- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt +++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt @@ -367,6 +367,7 @@ class DocumentationBuilder val extensionFunctionsByName = allExtensionFunctions.groupBy { it.name } for (extensionFunction in allExtensionFunctions) { + if (extensionFunction.dispatchReceiverParameter != null) continue val possiblyShadowingFunctions = extensionFunctionsByName[extensionFunction.name] ?.filter { fn -> fn.canShadow(extensionFunction) } ?: emptyList() @@ -677,9 +678,10 @@ class DocumentationBuilder receiverClass = upperBoundClass } } - link(receiverClass, - containingDeclaration, - RefKind.Extension) + + if ((containingDeclaration as? FunctionDescriptor)?.dispatchReceiverParameter == null) { + link(receiverClass, containingDeclaration, RefKind.Extension) + } val node = DocumentationNode(name.asString(), Content.Empty, NodeKind.Receiver) node.appendType(type) |