Bug 19262 – hashOf associative array should infer nothrow
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-09-24T19:51:28Z
Last change time
2018-10-07T05:25:33Z
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2018-09-24T19:51:28Z
The following code doesn't compile:
---
void main() nothrow
{
int[int] aa;
auto h = .hashOf(aa);
}
---
The underlying issue is that `_aaApply2` (used in `foreach` over an associative array) is not able to infer `nothrow`, but it will probably be easier to use a workaround than to address that.
Comment #1 by n8sh.secondary — 2018-10-06T15:54:33Z