[Issue 24169] Confusion between array literal and associative array literal
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 29 09:27:19 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24169
Dennis <dkorpel at live.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dkorpel at live.nl
--- Comment #3 from Dennis <dkorpel at live.nl> ---
> 1. all keys are present
Sounds reasonable
> 2. the key type is not integrably promotable to size_t
Associative arrays with integer key types are valid, changing the inferred type
of the literal to an integer array is a breaking change.
> the range of key values is more than twice the number of entries
This is trying to be clever, when the rule should be simple. It would be
surprising when adding a key to an existing associative array suddenly turns it
into an integer array or vice versa.
--
More information about the Digitalmars-d-bugs
mailing list