-
Notifications
You must be signed in to change notification settings - Fork 63
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
active_reg_inner
with justActive = true
incorrect with immutable types that can be incompletely initialized
#1935
Comments
your understanding is correct and this is a bug needing investigation |
The culprit is the following conditional: Lines 470 to 472 in 3c0871d
Should |
Changing to Is this branch just a short-circuiting early return, or is it necessary for correctness? If it's the former, the condition only has to match a subset of the types that could use an early return, so |
In the process of achieving comprehensive test coverage for #1852 I've stumbled upon the following corner case:
As far as I understand,
justActive = true
is supposed to map MixedState to ActiveState and DupState to AnyState, for when you just want to know whether or not the type contains immutable active storage. This example breaks that mapping.The problem remains if I replace
dummy
withFoo
. I'm usingdummy
here to emphasize that it's the incomplete use ofnew
in the struct definition that triggers the error, rather than something specific to inner constructor methods. The problem also remains if I add a fully initializing inner constructor next to the incomplete one.The issue disappears with any of the following changes:
dummy(x)
new
in a fully initializing way, e.g.,new(x, Core.Box(nothing))
The text was updated successfully, but these errors were encountered: