[Issue 21015] New: aa.byKeyValue, byKey provide mutable reference access to keys
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 5 18:56:15 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21015
Issue ID: 21015
Summary: aa.byKeyValue, byKey provide mutable reference access
to keys
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: schveiguy at yahoo.com
e.g.:
int[int] aa;
aa[5] = 6;
foreach(ref k; aa.byKey) k = 10;
writeln(aa); // [10:6]
foreach(kvp; aa.byKeyValue) kvp.key = 11;
writeln(aa); // [11:6]
--
More information about the Digitalmars-d-bugs
mailing list