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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 28 11:20:01 PDT 2012


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


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|                            |yebblies at gmail.com
         Resolution|                            |INVALID


--- Comment #5 from yebblies <yebblies at gmail.com> 2012-10-29 05:19:42 EST ---
(In reply to comment #4)
> 
> 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[]`.

That is not a bug, casting an array literal is not the same as casting an
array/slice.  While this is an inconsistent design, it is definitely
intentional.

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