www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15681] New: Nested user type enum not retaining value properly.

https://issues.dlang.org/show_bug.cgi?id=15681

          Issue ID: 15681
           Summary: Nested user type enum not retaining value properly.
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: gyroheli gmail.com

Created attachment 1582
  --> https://issues.dlang.org/attachment.cgi?id=1582&action=edit
code

http://ideone.com/dJR9M3

The attached code generates:

1 2 3 
1 2 3 
1 2 3 
1 0 0 
0 2 0 
0 0 3 

When it should generate:

1 0 0 
0 2 0 
0 0 3
1 0 0 
0 2 0 
0 0 3

Seems there's some sort of issue that assigns all the values for one "A" all
the same value.

--
Feb 14 2016