spxbhuhb / adaptive

Consolidated full-stack application development library for Kotlin
https://adaptive.fun
Apache License 2.0
3 stars 0 forks source link

Outer instructions after lambda #37

Closed toth-istvan-zoltan closed 4 months ago

toth-istvan-zoltan commented 4 months ago

The second form results in a compiler error. It should be perfectly legal.

java.lang.IllegalStateException: non-adaptive call in rendering: input(, selector = local fun <anonymous>(): String {
  return s
}
).rangeTo(instructions = <get-dpEditorInstructions>())
row {
    text("left:")
    input(*dpEditorInstructions) { s }
}
row {
    text("bottom:")
    input { s } .. dpEditorInstructions
}
toth-istvan-zoltan commented 4 months ago

This was a result of adding return type of AdaptiveFragment to the functions input, row, etc.