I’ve found the problem in my codebase and I’ve tried to simplify it to the following snippet:
class DemoProguardIssue {
fun main() {
with(Unit) {
runLambda {
runLambda {
}
}
}
}
private fun runLambda(lambda: () -> Unit) = lambda()
}
Proguard complains with this error and breaks my build
Warning: com.example.DemoProguardIssue$main$1$1$1: can't find referenced class com.example.DemoProguardIssue$main$1$1
Rewriting the code to avoid the with
was an easy workaround for me, but I’m scared there’s a bug in the compiler, or the desugar tool or something.
Can you help me figure out the problem?