www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1799] New: Wrong constant folding in static array types.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1799

           Summary: Wrong constant folding in static array types.
           Product: D
           Version: 1.024
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: aziz.kerim gmail.com


char[1i] a; // char[0]
char[1-1i] b; // char[1]
char[2+1i] c; // char[2]

const x = 2+1i; // typeof(x) == cdouble
char[x] d; // char[2]

It looks like the real part of the complex number is always chopped off. Should
be an error in the constant folding code.


-- 
Jan 22 2008
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1799


aziz.kerim gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE







*** This bug has been marked as a duplicate of 1798 ***


-- 
Jan 22 2008