Add explicit return types to helpers

also workarounds a problem (KT-30297) with new inference
This commit is contained in:
Ilya Chernikov
2019-05-13 10:08:49 +02:00
parent 4fb2f81134
commit b7fd898bb8
@@ -57,9 +57,9 @@ open class PropertiesCollection(private val properties: Map<Key<*>, Any?> = empt
override fun hashCode(): Int = properties.hashCode()
companion object {
fun <T> key(defaultValue: T? = null) = PropertyKeyDelegate(defaultValue)
fun <T> key(getDefaultValue: PropertiesCollection.() -> T?) = PropertyKeyDelegate(getDefaultValue)
fun <T> keyCopy(source: Key<T>) = PropertyKeyCopyDelegate(source)
fun <T> key(defaultValue: T? = null): PropertyKeyDelegate<T> = PropertyKeyDelegate(defaultValue)
fun <T> key(getDefaultValue: PropertiesCollection.() -> T?): PropertyKeyDelegate<T> = PropertyKeyDelegate(getDefaultValue)
fun <T> keyCopy(source: Key<T>): PropertyKeyCopyDelegate<T> = PropertyKeyCopyDelegate(source)
@JvmStatic
private val serialVersionUID = 1L