[Issue 13777] New: Value range propagation faild on array function argument

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Nov 26 02:31:00 PST 2014


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

          Issue ID: 13777
           Summary: Value range propagation faild on array function
                    argument
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: verylonglogin.reg at gmail.com

This code used to work:
---
T select(T)(in size_t idx, T[2] values...)
{
    return values[idx];
}

void main()
{
    ubyte ub = select(0, 3, 4);
}
---

In case it was an accept-invalid bug, a clear reason to disallow the feature
should be stated as it breaks user code without any deprecation cycle.

--


More information about the Digitalmars-d-bugs mailing list