[Issue 14380] New: core.bitop.bsf is marked as pure but isn't

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Mar 30 17:26:19 PDT 2015


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

          Issue ID: 14380
           Summary: core.bitop.bsf is marked as pure but isn't
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: thecybershadow at gmail.com

core.bitop.bsf returns an undefined value if its argument is 0. However, it is
marked as pure.

The function should either assert that its input is non-zero, or have its pure
attribute removed.

--


More information about the Digitalmars-d-bugs mailing list