www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12928] New: Range check dropped for array[length]


          Issue ID: 12928
           Summary: Range check dropped for array[length]
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: lio+bugzilla lunesu.com

Index expression with [length] is not valid and should through a Range
violation exception, but this is not the case.

void main(string[] args)
  int[2] a;
  foreach(const i; 0..3)
    a[i] = i;

Jun 15 2014