aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-02-24 14:27:03 +0100
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-02-27 10:51:51 +0100
commita7f99e9929d6d8993d86d64056d29af7b8077dbf (patch)
tree966ae6770dbd9becdab2fd279875fe4fd1d0dd7b /core/src
parent82e3673b77128ec39d09e9e96c61c3de6791557a (diff)
downloaddokka-a7f99e9929d6d8993d86d64056d29af7b8077dbf.tar.gz
dokka-a7f99e9929d6d8993d86d64056d29af7b8077dbf.tar.bz2
dokka-a7f99e9929d6d8993d86d64056d29af7b8077dbf.zip
Moving expect value to PlaformDependent
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/model/Documentable.kt10
1 files changed, 1 insertions, 9 deletions
diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt
index 3c97feaf..54983467 100644
--- a/core/src/main/kotlin/model/Documentable.kt
+++ b/core/src/main/kotlin/model/Documentable.kt
@@ -32,7 +32,7 @@ abstract class Documentable {
}
}
-data class PlatformDependent<out T>(val map: Map<PlatformData, T>) : Map<PlatformData, T> by map {
+data class PlatformDependent<out T>(val map: Map<PlatformData, T>, val expect: T? = null) : Map<PlatformData, T> by map {
val prevalentValue: T?
get() = if (map.all { values.first() == it.value }) values.first() else null
@@ -42,7 +42,6 @@ data class PlatformDependent<out T>(val map: Map<PlatformData, T>) : Map<Platfor
}
interface WithExpectActual {
- val expect: DocumentableSource?
val actual: PlatformDependent<DocumentableSource>
}
@@ -123,7 +122,6 @@ class Class(
override val functions: List<Function>,
override val properties: List<Property>,
override val classlikes: List<Classlike>,
- override val expect: DocumentableSource?,
override val actual: PlatformDependent<DocumentableSource>,
override val visibility: PlatformDependent<Visibility>,
override val companion: Object?,
@@ -142,7 +140,6 @@ class Enum(
override val name: String,
val entries: List<EnumEntry>,
override val documentation: PlatformDependent<DocumentationNode>,
- override val expect: DocumentableSource?,
override val actual: PlatformDependent<DocumentableSource>,
override val functions: List<Function>,
override val properties: List<Property>,
@@ -177,7 +174,6 @@ class Function(
val returnType: TypeWrapper?,
val parameters: List<Parameter>,
override val documentation: PlatformDependent<DocumentationNode>,
- override val expect: DocumentableSource?,
override val actual: PlatformDependent<DocumentableSource>,
override val visibility: PlatformDependent<Visibility>,
override val type: PlatformDependent<TypeWrapper>,
@@ -195,7 +191,6 @@ class Interface(
override val dri: DRI,
override val documentation: PlatformDependent<DocumentationNode>,
override val original: PlatformDependent<Interface>,
- override val expect: DocumentableSource?,
override val actual: PlatformDependent<DocumentableSource>,
override val functions: List<Function>,
override val properties: List<Property>,
@@ -214,7 +209,6 @@ class Object(
override val dri: DRI,
override val documentation: PlatformDependent<DocumentationNode>,
override val original: PlatformDependent<Object>,
- override val expect: DocumentableSource?,
override val actual: PlatformDependent<DocumentableSource>,
override val functions: List<Function>,
override val properties: List<Property>,
@@ -231,7 +225,6 @@ class Annotation(
override val dri: DRI,
override val documentation: PlatformDependent<DocumentationNode>,
override val original: PlatformDependent<Annotation>,
- override val expect: DocumentableSource?,
override val actual: PlatformDependent<DocumentableSource>,
override val functions: List<Function>,
override val properties: List<Property>,
@@ -248,7 +241,6 @@ class Property(
override val dri: DRI,
override val name: String,
override val documentation: PlatformDependent<DocumentationNode>,
- override val expect: DocumentableSource?,
override val actual: PlatformDependent<DocumentableSource>,
override val visibility: PlatformDependent<Visibility>,
override val type: PlatformDependent<TypeWrapper>,