[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 02:21:32 PDT 2013


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



--- Comment #15 from Kenji Hara <k.hara.pg at gmail.com> 2013-10-10 02:21:30 PDT ---
(In reply to comment #10)
>   uint[]  udarr;
>   uint[1] usarr;
> 
>   int[1] arr1 = udarr; //OK
>   int[1] arr2 = usarr; //OK

Mmm...I think this is a bug. Because following code is also accepted in
compilation, and will cause runtime exception!

void main()
{
  int[4] sa;
  ulong[4] sa2 = sa;
}

-- 
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