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

           Summary: Regression(2.054) Implicit pure/nothrow/@safe messes
                    up delegate arrays
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: cbkbbej...@mailinator.com


--- Comment #0 from Nick Sabalausky <cbkbbej...@mailinator.com> 2011-07-19 
21:00:27 PDT ---
pure:
-------------
int a;
void main()
{
    void delegate()[] dgArray = [
        () {},
        () { a = 1; }
    ];
}
-------------

testDgArray1.d(7): Error: incompatible types for ((__dgliteral1) ?
(__dgliteral2)): 'void delegate() pure nothrow @safe' and 'void delegate()
nothrow @safe'

==================================

nothrow:
-------------
void main()
{
    void delegate()[] dgArray = [
        () {},
        () { throw new Exception(""); }
    ];
}
-------------

testDgArray2.d(6): Error: incompatible types for ((__dgliteral1) ?
(__dgliteral2)): 'void delegate() pure nothrow @safe' and 'void delegate() pure
@safe'

==================================

@safe:
-------------
void main()
{
    void delegate()[] dgArray = [
        () {},
        () { *(cast(int*)0) = 1; }
    ];
}
-------------

testDgArray3.d(6): Error: incompatible types for ((__dgliteral1) ?
(__dgliteral2)): 'void delegate() pure nothrow @safe' and 'void delegate() pure
nothrow @system'

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

Reply via email to