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

          Issue ID: 13434
           Summary: [ICE] indexing array with empty tuple causes dmd
                    segfault
           Product: D
           Version: unspecified
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

Code:
------
alias tuple(A...) = A;
void main() {
        float[] arr;
        arr[tuple!()] = 0.0;
}
------

Indexing with a tuple of 1 integral element works correctly, and indexing with
a tuple of more than 1 element correctly generates an error message about
non-convertibility to ulong.

Indexing with an empty tuple should also generate an error message, rather than
crash.

--

Reply via email to