Bug 1798 – Wrong constant folding in static array types.
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2008-01-22T09:01:00Z
Last change time
2015-06-09T05:11:47Z
Keywords
accepts-invalid
Assigned to
nobody
Creator
aziz.koeksal
Comments
Comment #0 by aziz.koeksal — 2008-01-22T09:01:59Z
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.
Comment #1 by aziz.koeksal — 2008-01-22T09:05:18Z
> It looks like the real part of the complex number is always chopped off.
Ah, it's the other way around. The imaginary part is cut off.
Comment #2 by aziz.koeksal — 2008-01-22T09:06:54Z
*** Bug 1799 has been marked as a duplicate of this bug. ***