https://kotlinlang.org logo
#announcements
Title
# announcements
d

david.bilik

11/16/2017, 7:59 AM
Hi, is it some known issue or problem of mine that if you have too many nested lambdas, proguard fails? My code is something like this
Copy code
with(layout) {
    viewmodel.observeData()
        .subscribe {
            myField.setDataWithCallback(it, {
                viewmodel.onFieldChanged(it)
            })
    }
}
and proguard fails on
Warning: com.example.calculator.CalculatorFragment$onViewCreated$1$4$1: can't find referenced class com.example.calculator.CalculatorFragment$onViewCreated$1$4
It happened to me before and i solved that by refactoring my code to multiple methods but still, I dont think its necessary here
o

orangy

11/16/2017, 10:17 AM
Is it possible to reduce code to a self-contained small snippet which still reproduces the problem, so that we can investigate it? /cc @max.kammerer
d

david.bilik

11/16/2017, 10:48 AM
I will try to come up with some example project 🙂
o

orangy

11/20/2017, 11:53 AM
@david.bilik were you able to reproduce it in a small setting?
d

david.bilik

11/20/2017, 11:57 AM
Sorry, Im in a little bit of hurry with one project and i did not have time to make that small project. But i will try to make it 😞
2 Views