[Issue 12586] New: redundant error messages for tuple index exceeding

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 15 19:51:50 PDT 2014


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

          Issue ID: 12586
           Summary: redundant error messages for tuple index exceeding
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: k.hara.pg at gmail.com

Test case:

alias TypeTuple(T...) = T;
alias binaryFun(alias fun) = fun;

void main()
{
    int f(int v) { return v; }

    alias fun = TypeTuple!(f);
    alias Types = TypeTuple!(int, int);

    foreach (i, Unused; Types)
    {
        binaryFun!(fun[i])(1);
    }
}

Prints:
---
test.d(14): Error: tuple index 1 exceeds length 1
test.d(14): Error: tuple index 1 exceeds 1

Should be:
---
test.d(14): Error: tuple index 1 exceeds length 1

--


More information about the Digitalmars-d-bugs mailing list