[Issue 3198] wrong initializer for structs arrays
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 30 14:35:48 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3198
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
CC| |clugdbug at yahoo.com.au
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2009-12-30 14:35:46 PST ---
The bug clearly lies in todt.c, inside
dt_t **TypeSArray::toDtElem(dt_t **pdt, Expression *e).
If it's an array of structs, (ie, tbn->ty == Tstruct), then the 'e' value is
completely ignored!! This is certainly wrong.
Changing the two places where the check is:
if (tbn->ty == Tstruct)
into:
if (tbn != e->type && tbn->ty == Tstruct)
allows the test case to pass.
But that may not be the correct criterion to use.
--
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