From b7fd898bb8b02784fa9a0a327e3f553dcb16ed44 Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Mon, 13 May 2019 10:08:49 +0200 Subject: [PATCH] Add explicit return types to helpers also workarounds a problem (KT-30297) with new inference --- .../kotlin/script/experimental/util/propertiesCollection.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/scripting/common/src/kotlin/script/experimental/util/propertiesCollection.kt b/libraries/scripting/common/src/kotlin/script/experimental/util/propertiesCollection.kt index 0941fc25750..e946009ae94 100644 --- a/libraries/scripting/common/src/kotlin/script/experimental/util/propertiesCollection.kt +++ b/libraries/scripting/common/src/kotlin/script/experimental/util/propertiesCollection.kt @@ -57,9 +57,9 @@ open class PropertiesCollection(private val properties: Map, Any?> = empt override fun hashCode(): Int = properties.hashCode() companion object { - fun key(defaultValue: T? = null) = PropertyKeyDelegate(defaultValue) - fun key(getDefaultValue: PropertiesCollection.() -> T?) = PropertyKeyDelegate(getDefaultValue) - fun keyCopy(source: Key) = PropertyKeyCopyDelegate(source) + fun key(defaultValue: T? = null): PropertyKeyDelegate = PropertyKeyDelegate(defaultValue) + fun key(getDefaultValue: PropertiesCollection.() -> T?): PropertyKeyDelegate = PropertyKeyDelegate(getDefaultValue) + fun keyCopy(source: Key): PropertyKeyCopyDelegate = PropertyKeyCopyDelegate(source) @JvmStatic private val serialVersionUID = 1L