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

           Summary: CTFE rejects function pointer safety casts
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Don <[email protected]> 2013-07-08 03:39:29 PDT ---
@safe void safetyDance() {}

int isItSafeToDance()
{
    void function() @trusted yourfriends = &safetyDance;
    void function() @safe nofriendsOfMine = yourfriends;
    return 1;
}

static assert(isItSafeToDance());
---
bug.d(6): Error: reinterpreting cast from @trusted void()* to @safe void()* is
not supported in CTFE
bug.d(10):        called from here: isItSafeToDance()
bug.d(10):        while evaluating: static assert(isItSafeToDance())

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

Reply via email to