[Issue 16566] New: hasLength should enforce that length has type size_t

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Sep 30 17:42:22 PDT 2016


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

          Issue ID: 16566
           Summary: hasLength should enforce that length has type size_t
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: andrei at erdani.com

Currently hasLength verifies that length has the exact type size_t. Currently
it's more permissive allowing anything implicitly convertible to ulong. See
some discussion in https://github.com/dlang/phobos/pull/4815.

There is a gray area of 64-bit length on 32-bit system but I doubt much code
could work that way.

--


More information about the Digitalmars-d-bugs mailing list