Skip to content

fix issue #22556 - shared AAs with RefCounted values don't work even after removing shared#22645

Merged
dlang-bot merged 1 commit intodlang:stablefrom
rainers:issue22556
Feb 27, 2026
Merged

fix issue #22556 - shared AAs with RefCounted values don't work even after removing shared#22645
dlang-bot merged 1 commit intodlang:stablefrom
rainers:issue22556

Conversation

@rainers
Copy link
Member

@rainers rainers commented Feb 26, 2026

allow AA.clear with shared values for backward compatibility

Long term, access to shared AAs should be deprecated, there is little safe about that. clear() in the given scenario might be an exception, as it only removes the non-shared part of the AA pointing to the shared values.

…even after removing shared

allow AA.clear with shared values for backward compatibility
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @rainers!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

  • In preparation for migrating from Bugzilla to GitHub Issues, the issue reference syntax has changed. Please add the word "Bugzilla" to issue references. For example, Fix Bugzilla Issue 12345 or Fix Bugzilla 12345.(Reminder: the edit needs to be done in the Git commit message, not the GitHub pull request.)

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#22645"

@dlang-bot dlang-bot merged commit 40555fc into dlang:stable Feb 27, 2026
90 of 91 checks passed
@rikkimax
Copy link
Contributor

If you do a PR to deprecate shared AA's, I can bring it up at the next monthly meeting.
Ping me when you've got a solution you like.
I am noting the transitive nature of shared may be a problem here.

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.

4 participants