diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-06-26 11:05:57 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-06-26 11:05:57 +0200 |
commit | 9c914beef971705fab6711d54747136f38c02c69 (patch) | |
tree | 26a84461d9cfd3380496ff5a1f943dbfe7d73661 /src/main/kotlin/pl/treksoft | |
parent | 1f5742bebbafbe20a9d7527794798db7ebe5ab98 (diff) | |
download | kvision-9c914beef971705fab6711d54747136f38c02c69.tar.gz kvision-9c914beef971705fab6711d54747136f38c02c69.tar.bz2 kvision-9c914beef971705fab6711d54747136f38c02c69.zip |
New type inference workaround (KT-32168)
Diffstat (limited to 'src/main/kotlin/pl/treksoft')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/core/Widget.kt | 9 |
1 files 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<String> = setOf()) : StyledComponent(), Component override fun dispose() { } - protected fun <T> refreshOnUpdate(refreshFunction: ((T) -> Unit) = { this.refresh() }) = - RefreshDelegateProvider<T>(null, refreshFunction) + protected fun <T> refreshOnUpdate(refreshFunction: ((T) -> Unit) = { this.refresh() }): RefreshDelegateProvider<T> = + RefreshDelegateProvider(null, refreshFunction) - protected fun <T> refreshOnUpdate(initialValue: T, refreshFunction: ((T) -> Unit) = { this.refresh() }) = + protected fun <T> refreshOnUpdate( + initialValue: T, + refreshFunction: ((T) -> Unit) = { this.refresh() } + ): RefreshDelegateProvider<T> = RefreshDelegateProvider(initialValue, refreshFunction) protected inner class RefreshDelegateProvider<T>( |