From dd39219ee44cfeb9ec2dc8e1ab7b43ad64e143e3 Mon Sep 17 00:00:00 2001 From: Vasily Levchenko Date: Tue, 12 Dec 2017 14:16:05 +0300 Subject: [PATCH] [properties] naive prioritize suffixed keys against unsuffixed --- .../kotlin/org/jetbrains/kotlin/konan/target/Properties.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Properties.kt b/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Properties.kt index d9fc767f160..248e303e0e1 100644 --- a/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Properties.kt +++ b/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Properties.kt @@ -38,8 +38,7 @@ fun File.saveProperties(properties: Properties) { fun Properties.saveToFile(file: File) = file.saveProperties(this) -fun Properties.propertyString(key: String, suffix: String? = null): String? - = this.getProperty(key.suffix(suffix)) +fun Properties.propertyString(key: String, suffix: String? = null): String? = getProperty(key.suffix(suffix)) ?: this.getProperty(key) /** * TODO: this method working with suffixes should be replaced with