From 295c8f1ad4d51e124efe4bbeb4351fa4db6b40d1 Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Wed, 17 Jun 2020 14:38:02 +0200 Subject: KotlinSignatureProvider: Render 'fun interface' into signature --- core/src/main/kotlin/model/extraModifiers.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/src') 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") } } -- cgit