I have a function with lambda parameter:
private fun MyFun(
progress: () -> Float,
) {
// ...
}
I want to annotate return value of progress lambda with @FloatRange(from = 0.0, to = 1.0), but can't figure out how to do this. All my attempts to solve this causes syntax errors. Where am I wrong?