PHondogo
03/08/2020, 7:55 AMfun main() {
embeddedServer(Netty, port = 8080, host = "127.0.0.1") {
routing {
get("/") {
call.respondHtml {
head {
title("Hello from Ktor!")
}
body {
+"${hello()} from Ktor. Check me value: ${Sample().checkMe()}"
div {
id = "js-response"
+"Loading..."
}
script(src = "/static/test_js.js") {}
}
}
}
static("/static") {
resource("test_js.js")
}
}
}.start(wait = true)
}
After compiling it with useIR=false
it works ok, but
after compiling it with useIR=true
it throws execption on `call.respondHtml {`:
java.lang.NoSuchMethodError: 'java.lang.Object io.ktor.html.RespondHtmlKt.respondHtml$default(io.ktor.application.ApplicationCall, io.ktor.http.HttpStatusCode, kotlin.jvm.functions.Function1, int, java.lang.Object, kotlin.coroutines.Continuation)'
Please, advice me how can I make it work with useIR=true
.udalov
1.4-SNAPSHOT
Kotlin version (not sure if it has those fixes already though)PHondogo
03/09/2020, 8:36 PM