[Issue 12306] New: Struct Enums cannot be read at compile time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 6 13:50:49 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12306
Summary: Struct Enums cannot be read at compile time
Product: D
Version: D2
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: jbinero at gmail.com
--- Comment #0 from Jeroen Bollen <jbinero at gmail.com> 2014-03-06 13:50:45 PST ---
Created an attachment (id=1337)
Example Code - "dmd main.d"
When a struct enum is defined like this, it's values cannot be read at compile
time.
enum Point3D point = {x:1, y:1, z:1};
int testArray[point.x][point.y][point.z]; // z Cannot be read at
compile time (will error 6 times)
Working (well, technically not working) code in attachment. Tested for both 32
bit and 64 bit on a Linux system.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list