[Issue 7012] New: Pure vector operations

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 25 16:45:12 PST 2011


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

           Summary: Pure vector operations
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: druntime
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-11-25 16:44:15 PST ---
I think vector ops need to become pure to allow code like:


void main() pure nothrow {
    int[3] a = [1, 2, 2];
    int[3] b = [10, 20, 20];
    immutable int[3] c = a[] + b[];
}


DMD 2.057head gives:

test.d(4): Error: cannot implicitly convert expression (a[] + b[]) of type
int[] to const(immutable(int)[])

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


More information about the Digitalmars-d-bugs mailing list