[Issue 11206] static array can be implicitly built from items, when nested in aggregate
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 10 00:50:48 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11206
--- Comment #10 from monarchdodra at gmail.com 2013-10-10 00:50:45 PDT ---
(In reply to comment #8)
> It seems you starting to understand the issue (but I haven't thought whether
> static arrays are only types supporting this).
OK. What about this...? Is it a bug?
//----
struct S
{
int[1] arr;
}
void main()
{
uint[] udarr;
uint[1] usarr;
int[1] arr1 = udarr; //OK
int[1] arr2 = usarr; //OK
S s1 = S(udarr); //NOPE?
S s2 = S(usarr); //NOPE?
}
//----
I'm not challenging you, I'm really just trying to understand the rules.
> Anyway this feature was working for years.
I make no claim to the contrary. Original confusion comes from what I saw as
"inconsistent", and made the "upside down conclusion". I guess I should have
filed instead (maybe) that AGG!S(1) should be legal.
--
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