[Issue 8901] a bug to cast from array literal to ubyte[]

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 28 04:54:13 PDT 2012


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


SHOO <zan77137 at nifty.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |zan77137 at nifty.com
         Resolution|INVALID                     |


--- Comment #4 from SHOO <zan77137 at nifty.com> 2012-10-28 04:54:11 PDT ---
This is like the bug somehow or other. However, by the document of the Web, it
does not seem to be touched about the explicit cast from array to array deeply.
In the current implementation, it is worked by _d_arraycast in druntime. The
cast is performed safely, and it throws Error if misalignment occurs.

This bug seems to happen, because `cast(ubyte[])[a]` is processed as
`cast(ubyte[])[cast(ubyte)a]` by dmd.
`[a]` should be always processed as `int[]`.

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