diff options
author | Sergey Mashkov <sergey.mashkov@jetbrains.com> | 2015-07-27 16:11:36 +0300 |
---|---|---|
committer | Sergey Mashkov <sergey.mashkov@jetbrains.com> | 2015-07-27 16:33:10 +0300 |
commit | 87edf7c5778a9e1ac3e17c9046110d69e8d197a6 (patch) | |
tree | 34cc927f19b0cf7149c502e0c04249cc6663c81f | |
parent | befbe69c3863b1048b585e795ec2f99d5a10390e (diff) | |
download | dokka-87edf7c5778a9e1ac3e17c9046110d69e8d197a6.tar.gz dokka-87edf7c5778a9e1ac3e17c9046110d69e8d197a6.tar.bz2 dokka-87edf7c5778a9e1ac3e17c9046110d69e8d197a6.zip |
Eliminate warnings caused by API changes
-rw-r--r-- | src/Kotlin/ContentBuilder.kt | 2 | ||||
-rw-r--r-- | src/Model/Content.kt | 2 | ||||
-rw-r--r-- | src/Model/DocumentationNode.kt | 1 | ||||
-rw-r--r-- | src/Model/PackageDocs.kt | 4 | ||||
-rw-r--r-- | test/src/markdown/MarkdownTestRunner.kt | 4 |
5 files changed, 7 insertions, 6 deletions
diff --git a/src/Kotlin/ContentBuilder.kt b/src/Kotlin/ContentBuilder.kt index 273009ab..34018217 100644 --- a/src/Kotlin/ContentBuilder.kt +++ b/src/Kotlin/ContentBuilder.kt @@ -121,7 +121,7 @@ fun DocumentationBuilder.functionBody(descriptor: DeclarationDescriptor, functio return ContentBlockCode().let() { it.append(ContentText("Missing function name in @sample")); it } } val scope = getResolutionScope(resolutionFacade, descriptor) - val rootPackage = session.getModuleDescriptor().getPackage(FqName.ROOT)!! + val rootPackage = session.getModuleDescriptor().getPackage(FqName.ROOT) val rootScope = rootPackage.memberScope val symbol = resolveInScope(functionName, scope) ?: resolveInScope(functionName, rootScope) if (symbol == null) { diff --git a/src/Model/Content.kt b/src/Model/Content.kt index 810d6417..032de268 100644 --- a/src/Model/Content.kt +++ b/src/Model/Content.kt @@ -142,7 +142,7 @@ public open class MutableContent() : Content() { public override val summary: ContentNode get() = children.firstOrNull() ?: ContentEmpty - public override val description: ContentNode by Delegates.lazy { + public override val description: ContentNode by lazy { val descriptionNodes = children.drop(1) if (descriptionNodes.isEmpty()) { ContentEmpty diff --git a/src/Model/DocumentationNode.kt b/src/Model/DocumentationNode.kt index 2f0638bc..b4343347 100644 --- a/src/Model/DocumentationNode.kt +++ b/src/Model/DocumentationNode.kt @@ -134,6 +134,7 @@ fun DocumentationNode.findOrCreatePackageNode(packageName: String, packageConten fun DocumentationNode.append(child: DocumentationNode, kind: DocumentationReference.Kind) { addReferenceTo(child, kind) + @suppress("NON_EXHAUSTIVE_WHEN") when (kind) { DocumentationReference.Kind.Detail -> child.addReferenceTo(this, DocumentationReference.Kind.Owner) DocumentationReference.Kind.Member -> child.addReferenceTo(this, DocumentationReference.Kind.Owner) diff --git a/src/Model/PackageDocs.kt b/src/Model/PackageDocs.kt index 3b0be547..b5b34942 100644 --- a/src/Model/PackageDocs.kt +++ b/src/Model/PackageDocs.kt @@ -13,8 +13,8 @@ public class PackageDocs(val documentationBuilder: DocumentationBuilder, public val packageContent: Map<String, Content> get() = _packageContent - fun parse(file: String) { - val file = File(file) + fun parse(path: String) { + val file = File(path) if (file.exists()) { val text = file.readText() val tree = parseMarkdown(text) diff --git a/test/src/markdown/MarkdownTestRunner.kt b/test/src/markdown/MarkdownTestRunner.kt index 867deece..5ad0224f 100644 --- a/test/src/markdown/MarkdownTestRunner.kt +++ b/test/src/markdown/MarkdownTestRunner.kt @@ -23,7 +23,7 @@ interface MarkdownTest { } public open class MarkdownTestCase(val spec: MarkdownSpecification, val input: String, val expected: String) : MarkdownTest, Runner() { - val _description by Delegates.lazy { + val _description by lazy { Description.createSuiteDescription(input, MarkdownTestUniqueId.next())!! } @@ -45,7 +45,7 @@ public open class MarkdownTestCase(val spec: MarkdownSpecification, val input: S public open class MarkdownTestSection(val spec: MarkdownSpecification, val title: String) : MarkdownTest, ParentRunner<MarkdownTest>(spec.javaClass) { val children = arrayListOf<MarkdownTest>(); - val _description by Delegates.lazy { + val _description by lazy { val desc = Description.createSuiteDescription(title, MarkdownTestUniqueId.next())!! for (item in getChildren()!!) { desc.addChild(describeChild(item)) |