Skip to content
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

Fix issue 21296 - std.variant.Variant cannot be initialized with immu… #7652

Merged
merged 1 commit into from
Oct 7, 2020

Conversation

tom-tan
Copy link
Contributor

@tom-tan tom-tan commented Oct 7, 2020

…table AA

The source of this issue is that the private static method Variant.handler.tryPutting accidentally generate a code for opIndexAssign to immutable AA in compile time.
This request fixes this issue by making tryPutting throwing an exception in runtime for such cases.


I also confirmed that Issue 13930 (std.concurrency can't send immutable AA) is also solved by this change.
It might be possible to add a test for issue 13930 but unfortunately there still remains an issue in receiving side (not yet filed).

@tom-tan tom-tan requested a review from andralex as a code owner October 7, 2020 12:00
@dlang-bot dlang-bot merged commit cf9b0c7 into dlang:master Oct 7, 2020
@tom-tan tom-tan deleted the fix-issue21296 branch October 8, 2020 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants