[Issue 12874] New: Wrong file name in range violation error

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jun 7 07:19:11 PDT 2014


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

          Issue ID: 12874
           Summary: Wrong file name in range violation error
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic, wrong-code
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: k.hara.pg at gmail.com

module test;
import a;
void main()
{
    int x;
    foo!(x)();
}

module a;
template foo(alias x)
{
    void check(int[] arr)
    {
        auto n = arr[0];
    }
    void foo()
    {
        check([]);
    }
}

$ dmd test.d a.d
$ test.exe
core.exception.RangeError at test.d(5): Range violation

The runtime error should print a.d(5).

--


More information about the Digitalmars-d-bugs mailing list