Bug 21014 – aa.byKeyValue, byKey, byValue very under-documented

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-07-05T18:35:43Z
Last change time
2022-01-13T11:00:06Z
Keywords
pull
Assigned to
No Owner
Creator
Steven Schveighoffer

Comments

Comment #0 by schveiguy — 2020-07-05T18:35:43Z
e.g.: https://github.com/dlang/druntime/blob/d3dfa0778fbad77482b0ae8e7e528b55aa417c19/src/object.d#L2491-L2497 ``` /*********************************** * Returns a forward range over the key value pairs of the associative array. * Params: * aa = The associative array. * Returns: * A forward range. */ ``` No indication of what the range's front returns, if items are returned by reference, if changes to the AA invalidate the type returned by front, etc. In fact, the front type is a voldemort type with a ref accessor for both key and value (named as such). Putting in documentation as to what the range provides would be helpful. I shouldn't have to look at the source.
Comment #1 by dlang-bot — 2021-03-20T21:41:20Z
@wolframw created dlang/druntime pull request #3401 "Fix Issue 21014 - aa.byKeyValue, byKey, byValue very under-documented" fixing this issue: - Fix Issue 21014 - aa.byKeyValue, byKey, byValue very under-documented https://github.com/dlang/druntime/pull/3401
Comment #2 by dlang-bot — 2021-12-24T13:06:09Z
@wolframw created dlang/druntime pull request #3658 "Fix Issue 21014 - aa.byKeyValue, byKey, byValue very under-documented" fixing this issue: - Fix Issue 21014 - aa.byKeyValue, byKey, byValue very under-documented https://github.com/dlang/druntime/pull/3658
Comment #3 by dlang-bot — 2022-01-13T11:00:06Z
dlang/druntime pull request #3658 "Fix Issue 21014 - aa.byKeyValue, byKey, byValue very under-documented" was merged into master: - 450ab88e67516e81f56fcbbd741fb405ceb15bb8 by wolframw: Fix Issue 21014 - aa.byKeyValue, byKey, byValue very under-documented https://github.com/dlang/druntime/pull/3658