www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11085] New: Refused power vector operation of composed expression

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

           Summary: Refused power vector operation of composed expression
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



import std.math;
void main() {
    double[3] a, b, c;
    b[] = a[] ^^ 2;         // OK
    c[] = (a[] + b[]) * 2;  // OK
    c[] = (a[] + b[]) ^^ 2; // Error
}


DMD 2.064 alpha gives:

test.d(6): Error: incompatible types for ((a[] + b[]) ^^ (cast(double)2)):
'double[]' and 'double'

(Another problem is that the exponent should not be converted to double.)

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