[Issue 4961] ICE on Tuple in union as part of static struct member

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Oct 5 01:56:40 PDT 2010


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-10-05 01:56:06 PDT ---
Reduced test case shows it doesn't require tuples.

struct Fields4961 { int x; }
struct bar4961 {
    union {
       int[1] value;
       Fields4961 fields;
    }

    this( int r ) {
       fields.x = r;       
    }    
}
static bar4961 b4961 = bar4961( 0 );

Interestingly, if you swap 'value' and 'fields', you get an error message with
no line number:

Error: duplicate union initialization for value

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list