[Issue 11085] New: Refused power vector operation of composed expression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 21 05:52:50 PDT 2013


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 at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2013-09-21 05:52:49 PDT ---
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: -------


More information about the Digitalmars-d-bugs mailing list