[Issue 19262] New: core.internal.hash.hashOf associative array should infer nothrow

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 24 19:51:28 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19262

          Issue ID: 19262
           Summary: core.internal.hash.hashOf associative array should
                    infer nothrow
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: n8sh.secondary at hotmail.com

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.

--


More information about the Digitalmars-d-bugs mailing list