aboutsummaryrefslogtreecommitdiff
path: root/kvision-tools/kvision-compiler-plugin/src/main/kotlin
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-04-19 23:47:22 +0200
committerRobert Jaros <rjaros@finn.pl>2020-04-19 23:47:22 +0200
commit8741f76d8002aec9e512504b817f7381721aa33f (patch)
treeb3e78c6a29964fd2e3f9ed7308a30653fd62c8a8 /kvision-tools/kvision-compiler-plugin/src/main/kotlin
parentd29fbf079d56f743ed23ad2eac48b6e791ae47e5 (diff)
downloadkvision-8741f76d8002aec9e512504b817f7381721aa33f.tar.gz
kvision-8741f76d8002aec9e512504b817f7381721aa33f.tar.bz2
kvision-8741f76d8002aec9e512504b817f7381721aa33f.zip
Small fix for old type inference issue with generated code
Diffstat (limited to 'kvision-tools/kvision-compiler-plugin/src/main/kotlin')
-rw-r--r--kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt b/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt
index d456ceb7..00208266 100644
--- a/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt
+++ b/kvision-tools/kvision-compiler-plugin/src/main/kotlin/pl/treksoft/kvision/plugin/KVProcessor.kt
@@ -125,7 +125,11 @@ class KVProcessor : AbstractProcessor() {
when {
it.returnType.toString().startsWith("RemoteData") ->
appendln(" bindTabulatorRemote($iName::${it.name}, $route)")
- wsMethod -> appendln(" bind($iName::${it.name}, $route)")
+ wsMethod -> if (route == null) {
+ appendln(" bind($iName::${it.name}, null as String)")
+ } else {
+ appendln(" bind($iName::${it.name}, $route)")
+ }
else -> appendln(" bind($iName::${it.name}, $method, $route)")
}
}