diff --git a/gradle.properties b/gradle.properties index e014b4e..e892bb1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ kotlin.code.style=official specifyKotlinAsDependency=false projectGroup=ru.dbotthepony.kommons -projectVersion=2.9.18 +projectVersion=2.9.17 guavaDepVersion=33.0.0 gsonDepVersion=2.8.9 diff --git a/src/main/kotlin/ru/dbotthepony/kommons/util/KOptional.kt b/src/main/kotlin/ru/dbotthepony/kommons/util/KOptional.kt index 265d8bf..61a292d 100644 --- a/src/main/kotlin/ru/dbotthepony/kommons/util/KOptional.kt +++ b/src/main/kotlin/ru/dbotthepony/kommons/util/KOptional.kt @@ -59,7 +59,7 @@ class KOptional private constructor(private val _value: T, val isPresent: Boo } @Suppress("NOTHING_TO_INLINE") - inline fun orElse(value: E): T { + inline fun orElse(value: T): T { if (isPresent) { return this.value } else { @@ -67,7 +67,7 @@ class KOptional private constructor(private val _value: T, val isPresent: Boo } } - inline fun orElse(value: () -> E): T { + inline fun orElse(value: () -> T): T { if (isPresent) { return this.value } else { @@ -75,11 +75,11 @@ class KOptional private constructor(private val _value: T, val isPresent: Boo } } - infix fun or(value: KOptional): KOptional { + infix fun or(value: KOptional): KOptional { if (isPresent) { return this } else { - return value as KOptional + return value } }