Fixed
Status Update
Comments
pa...@google.com <pa...@google.com>
ch...@google.com <ch...@google.com> #2
Partly, this is my fault -- val is not that useful in the @Model context, since @Model relies on mutability. I am used to thinking in terms of immutable viewstates and screwed this up.
However, it probably should not crash this way. Either it should work (with a never-changing value) or it should fail with a "are you *really* sure you want this here?" sort of error.
However, it probably should not crash this way. Either it should work (with a never-changing value) or it should fail with a "are you *really* sure you want this here?" sort of error.
ap...@google.com <ap...@google.com> #3
I'd like to add that declaring `canProceed` as a `var` won't crash the app.
The extension function is avoidable by just having the `get()`-getter function inside the class itself. That also avoids the crash.
The extension function is avoidable by just having the `get()`-getter function inside the class itself. That also avoids the crash.
Description
Android Studio Build: 4.0 Preview
Version of Gradle Plugin: 4.0.0-alpha02
Version of Gradle: 5.6.1
Version of Java: 1.8
OS: 21^
Steps to Reproduce:
1. Create two modules, a library module and app module for android
2. Create a class with @Model annotation in the library module
3. Set the @Model class as a dependency for an @Compose function in the app module
4. Try updating the model's value on button click (the model updates, but the function is not re-composed)