From 9c914beef971705fab6711d54747136f38c02c69 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 26 Jun 2019 11:05:57 +0200 Subject: New type inference workaround (KT-32168) --- src/main/kotlin/pl/treksoft/kvision/core/Widget.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt index 414356ce..2b2c7ef1 100644 --- a/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt +++ b/src/main/kotlin/pl/treksoft/kvision/core/Widget.kt @@ -783,10 +783,13 @@ open class Widget(classes: Set = setOf()) : StyledComponent(), Component override fun dispose() { } - protected fun refreshOnUpdate(refreshFunction: ((T) -> Unit) = { this.refresh() }) = - RefreshDelegateProvider(null, refreshFunction) + protected fun refreshOnUpdate(refreshFunction: ((T) -> Unit) = { this.refresh() }): RefreshDelegateProvider = + RefreshDelegateProvider(null, refreshFunction) - protected fun refreshOnUpdate(initialValue: T, refreshFunction: ((T) -> Unit) = { this.refresh() }) = + protected fun refreshOnUpdate( + initialValue: T, + refreshFunction: ((T) -> Unit) = { this.refresh() } + ): RefreshDelegateProvider = RefreshDelegateProvider(initialValue, refreshFunction) protected inner class RefreshDelegateProvider( -- cgit