www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10477] New: Allow bit shift in array operation

http://d.puremagic.com/issues/show_bug.cgi?id=10477

           Summary: Allow bit shift in array operation
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: r.97all gmail.com



---
import std.stdio;

void main()
{
    int[] a; a.length = 3;
    int[] b; b.length = 3;
    // both of the following cause same error.
    // Error: var has no effect in expression (c0)
    a[] <<= b[];
    a[] <<= 1;
    // another error message.
    // Error: 'a[]' is not of integral type, it is a int[]
    a[] = a[] << 1;
    a[] = a[] << b[];
}

I don't see why bit shift operation is not arrowed in array operations.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 26 2013