From 65dead174b91ba0152eabf5f49fda21b23e8f849 Mon Sep 17 00:00:00 2001 From: Santiago Acosta Date: Thu, 17 Oct 2019 18:51:33 +0100 Subject: [PATCH] Possible type mismatch in property_types.kt I cloned your repo and opened it in my IDE. An error popped out on line 106 about a type mismatch ``` Type mismatch. Required: ParseResult Found: ParseResult ``` I don't know if this is important because I've just started to learn Kotlin. I am running IntelliJ IDEA 2019.2.3 (Community Edition) Java 1.8.0_121 --- src/main/kotlin/com/natpryce/konfig/property_types.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/natpryce/konfig/property_types.kt b/src/main/kotlin/com/natpryce/konfig/property_types.kt index 16ed240..2dc8908 100644 --- a/src/main/kotlin/com/natpryce/konfig/property_types.kt +++ b/src/main/kotlin/com/natpryce/konfig/property_types.kt @@ -103,7 +103,7 @@ inline fun enumType(allowed: Map) = enumType(T::cla fun enumType(enumType: Class, allowed: Map) = propertyType(enumType) { str -> allowed[str] - ?.let { ParseResult.Success(it) } + ?.let { ParseResult.Success(it) } ?: ParseResult.Failure(IllegalArgumentException("invalid value: $str; must be one of: ${allowed.keys}")) }