aboutsummaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-06-17 14:38:02 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-06-18 09:29:02 +0200
commit295c8f1ad4d51e124efe4bbeb4351fa4db6b40d1 (patch)
tree0410dc70a7b3a04a73a933a91065145276a3ac98 /core/src
parent4ac93c20f3936d5824b77a04806a2cdcfbb5e25f (diff)
downloaddokka-295c8f1ad4d51e124efe4bbeb4351fa4db6b40d1.tar.gz
dokka-295c8f1ad4d51e124efe4bbeb4351fa4db6b40d1.tar.bz2
dokka-295c8f1ad4d51e124efe4bbeb4351fa4db6b40d1.zip
KotlinSignatureProvider: Render 'fun interface' into signature
Diffstat (limited to 'core/src')
-rw-r--r--core/src/main/kotlin/model/extraModifiers.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/main/kotlin/model/extraModifiers.kt b/core/src/main/kotlin/model/extraModifiers.kt
index 093ce62a..efaa3d60 100644
--- a/core/src/main/kotlin/model/extraModifiers.kt
+++ b/core/src/main/kotlin/model/extraModifiers.kt
@@ -18,6 +18,7 @@ sealed class ExtraModifiers(val name: String) {
object Operator : KotlinOnlyModifiers("operator")
object TailRec : KotlinOnlyModifiers("tailrec")
object VarArg : KotlinOnlyModifiers("vararg")
+ object Fun : KotlinOnlyModifiers("fun")
}
sealed class JavaOnlyModifiers(name: String) : ExtraModifiers(name) {
@@ -29,9 +30,9 @@ sealed class ExtraModifiers(val name: String) {
object Volatile : JavaOnlyModifiers("volatile")
object Transitive : JavaOnlyModifiers("transitive")
}
-
+
companion object {
- fun valueOf(str: String) = when(str) {
+ fun valueOf(str: String) = when (str) {
"inline" -> KotlinOnlyModifiers.Inline
"infix" -> KotlinOnlyModifiers.Infix
"external" -> KotlinOnlyModifiers.External
@@ -54,6 +55,7 @@ sealed class ExtraModifiers(val name: String) {
"transient" -> JavaOnlyModifiers.Transient
"volatile" -> JavaOnlyModifiers.Volatile
"transitive" -> JavaOnlyModifiers.Transitive
+ "fun" -> KotlinOnlyModifiers.Fun
else -> throw IllegalArgumentException("There is no Extra Modifier for given name $str")
}
}