Open steve-the-edwards opened 2 years ago
Surely this bug lies in the Compose compiler. I cannot see any way in which the code from Molecule could cause this. We're not involved in the compiler at all beyond telling it to apply the normal AndroidX Compose compiler plugin.
I don't have time to dig into it today, though.
I thought so too but could not reproduce in stock Compose.
Yeah I mean your repro shows that it's something to do with our setup, but I have a hard time envisioning what it is intuitively.
Reproducing project is here: https://github.com/steve-the-edwards/reproductions/tree/main/overridetest
Are defined in android-lib-module.
In the app module, a concrete child class of
AndroidLibAbstractClass
can be used successfully in a Compose UI composition.However, in the
launchMolecule
composition (seeMethodResolutionTest
) this fails onAndroidLibComposableWithLambda
:because it gets an AbstractMethodError as it cannot resolve the concrete class's override at runtime?
Originally I thought it might be because I was using the 0.3.0-SNAPSHOT and the common KMP artifacts so I include a module with that example as well, but I was able to reproduce it with just 0.2.0 while all in Android/JVM.