www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13434] New: [ICE] indexing array with empty tuple causes dmd


          Issue ID: 13434
           Summary: [ICE] indexing array with empty tuple causes dmd
           Product: D
           Version: unspecified
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: hsteoh quickfur.ath.cx

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

Sep 06 2014