www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11383] New: Some array casts incorrectly rejected in safe code

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

           Summary: Some array casts incorrectly rejected in safe code
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



18:07:14 MSK ---
---
void f()  safe
{
    const char[] arr;
    auto a1 = cast(const(ubyte)[]) arr[]; // ok
    auto a2 = cast(const(char) []) arr; // ok
    auto a3 = cast(const(ubyte)[]) arr; // Error: cast from const(char[]) to
const(ubyte)[] not allowed in safe code
}
---

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