aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2016-11-16 17:53:47 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2016-11-24 20:15:50 +0300
commit89d41a1bc909c7e350b07bc29d39762449d64650 (patch)
treed75ab02d9869d7663099882969554682f31c7fc0 /core/src
parent76c7e32f74b8982303a86f81b2ffed2b2a7e7c70 (diff)
downloaddokka-89d41a1bc909c7e350b07bc29d39762449d64650.tar.gz
dokka-89d41a1bc909c7e350b07bc29d39762449d64650.tar.bz2
dokka-89d41a1bc909c7e350b07bc29d39762449d64650.zip
Fix most of failing tests, by not unwrapping types, if it not abbreviated (Otherwise we will lose in/out variance)
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/Kotlin/DocumentationBuilder.kt7
-rw-r--r--core/src/test/kotlin/format/MarkdownFormatTest.kt2
2 files changed, 3 insertions, 6 deletions
diff --git a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
index 5f2d08f9..f922a25b 100644
--- a/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
+++ b/core/src/main/kotlin/Kotlin/DocumentationBuilder.kt
@@ -152,10 +152,9 @@ class DocumentationBuilder
fun DocumentationNode.appendType(kotlinType: KotlinType?, kind: NodeKind = NodeKind.Type, prefix: String = "") {
if (kotlinType == null)
return
- if (kotlinType is WrappedType)
- return appendType(kotlinType.unwrap())
- if (kotlinType is AbbreviatedType)
- return appendType(kotlinType.abbreviation)
+ (kotlinType.unwrap() as? AbbreviatedType)?.let {
+ return appendType(it.abbreviation)
+ }
val classifierDescriptor = kotlinType.constructor.declarationDescriptor
val name = when (classifierDescriptor) {
diff --git a/core/src/test/kotlin/format/MarkdownFormatTest.kt b/core/src/test/kotlin/format/MarkdownFormatTest.kt
index 280e8e22..c9f86503 100644
--- a/core/src/test/kotlin/format/MarkdownFormatTest.kt
+++ b/core/src/test/kotlin/format/MarkdownFormatTest.kt
@@ -27,8 +27,6 @@ class MarkdownFormatTest {
verifyMarkdownPackage("annotationClass", withKotlinRuntime = true)
}
- //TODO: Enable after typealias support
- // @Ignore("Disabled until we will correctly support typealias")
@Test fun exceptionClass() {
verifyMarkdownNode("exceptionClass", withKotlinRuntime = true)
verifyMarkdownPackage("exceptionClass", withKotlinRuntime = true)