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

           Summary: Reinterpret cast of static to dynamic array doesn't
                    work in safe code
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: psztur...@tlen.pl


--- Comment #0 from Piotr Szturmaj <psztur...@tlen.pl> 2011-10-23 06:54:44 PDT 
---
void main() @safe
{
    long[2] a;
    auto b = cast(ubyte[])a; // error
    auto c = cast(ubyte[])cast(long[])a; // works
}

main.d(4): Error: cast from long[2u] to ubyte[] not allowed in safe code

Without @safe mode there's no error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to