class ComposableRenderer : engine.components.ComposableRenderer {
// ...
override var renderComposable by setOnce<@Composable () -> Unit>() // setOnce defines getValue and setValue
}
Results in a strange error:
Copy code
Caused by: java.lang.AbstractMethodError: Receiver class engine.runtime.components.ComposableRenderer does not define or inherit an implementation of the resolved method 'abstract void setRenderComposable(kotlin.jvm.functions.Function2)' of interface engine.components.ComposableRenderer.
But shouldn't specifying it as
var
make it generate a setter?
h
hfhbd
06/17/2023, 9:31 AM
The Composer Compiler IR plugin rewrites your code by adding some parameters to the function, mainly the composer. Due to the rewrites, the original method signature will be changed and not found.