-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
releaseFence needs to be added at the end of constructors of classes that contain mixin fields #9424
Comments
Also relevant is scala/scala@5e109ff from scala/scala#7270, but tha's only an optimization (if I understand correctly) and one that depends on #9181 |
I won't have time to do that in the three weeks. If someone else wants to pick it up, I suggest to do that in Mixin. In |
Is it still a blocker for 3.0.0-M1? @smarter ? |
We can move it to M2 |
This is a forward port of relevant parts of the upstream PR scala/scala#7028
This is a forward port of relevant parts of the upstream PR scala/scala#7028
This is a forward port of relevant parts of the upstream PR scala/scala#7028
Fix #9424: Add `releaseFence()` call when mixing in a trait `val`.
Since #8652, fields in classes coming from traits are no longer marked
final
because they're set outside of the class constructor. When this was changed in scalac, they also had to add calls to releaseFence at the end of these constructors, this is justified with a comment:from scala/scala#7028, which we should port.
Tentatively assigning to @sjrd since unfortunately for him he has become our resident mixin expert :).
The text was updated successfully, but these errors were encountered: