aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-06-26 11:05:57 +0200
committerRobert Jaros <rjaros@finn.pl>2019-06-26 11:05:57 +0200
commit9c914beef971705fab6711d54747136f38c02c69 (patch)
tree26a84461d9cfd3380496ff5a1f943dbfe7d73661 /src/main/kotlin/pl/treksoft/kvision
parent1f5742bebbafbe20a9d7527794798db7ebe5ab98 (diff)
downloadkvision-9c914beef971705fab6711d54747136f38c02c69.tar.gz
kvision-9c914beef971705fab6711d54747136f38c02c69.tar.bz2
kvision-9c914beef971705fab6711d54747136f38c02c69.zip
New type inference workaround (KT-32168)
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/core/Widget.kt9
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>(