[Issue 551] New: Modulo operator works with imaginary and complex operands

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 18 04:11:35 PST 2006


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

           Summary: Modulo operator works with imaginary and complex
                    operands
           Product: D
           Version: 0.174
          Platform: PC
               URL: http://www.digitalmars.com/d/expression.html
        OS/Version: Windows
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P4
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: deewiant at gmail.com
OtherBugsDependingO 511
             nThis:


The spec states that "[t]he modulus operator only works with reals, it is
illegal to use it with imaginary or complex operands." yet DMD accepts all of
the following:

void main() {
        creal c = 1 + 1i;
        c %= 2;

        ireal i = 3i % 2;

        real r = 3 % 3i;
}


-- 




More information about the Digitalmars-d-bugs mailing list