www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10157] New: Vector ops with different types

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

           Summary: Vector ops with different types
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2013-05-23 15:34:00 PDT ---
Is code like this meant to work? It's useful code:


void main() {
    int[2] data = [10, 20];
    double[2] result;
    result[] = data[] * 0.5;
}



DMD 2.063beta5 gives:

test.d(4): Error: incompatible types for ((data[]) * (0.5)): 'int[]' and
'double'

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