-
-
Notifications
You must be signed in to change notification settings - Fork 420
[rt/aaA] Add _aaNew function to initialize AA #3863
Conversation
Thanks for your pull request and interest in making D better, @ntrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#3863" |
src/rt/aaA.d
Outdated
@@ -485,6 +485,14 @@ pure nothrow @nogc unittest | |||
// API Implementation | |||
//------------------------------------------------------------------------------ | |||
|
|||
/// Allocate new AA implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated docs.
_aaNew was added recently in dlang#3863. This is consistent with `_d_assocarrayliteralTX` returning `Impl*`. Also flesh out docs for _d_assocarrayliteralTX.
Oh man, this is awesome! Great idea! |
_aaNew was added recently in #3863. This is consistent with `_d_assocarrayliteralTX` returning `Impl*`. Also flesh out docs for _d_assocarrayliteralTX.
Add
druntime
support to initialize an AA. Currently you have to add and then remove a dummy key/value pair to actually allocate the AA. This is needed if you want to give out references to the same AA before populating it.https://issues.dlang.org/show_bug.cgi?id=10535
The syntax to do this will be
new AA
. I suggested that syntax and it was supported by @jacob-carlborg and @rainers here: #2504 (comment)I have the
dmd
counterpart readyto submit.dlang/dmd#14257