Thread overview
[Issue 6352] New: Regression(2.054) Implicit pure/nothrow/@safe messes up delegate arrays
Jul 20, 2011
Nick Sabalausky
Jul 20, 2011
Nick Sabalausky
Jul 20, 2011
yebblies
Jul 20, 2011
Nick Sabalausky
Sep 02, 2011
yebblies
Sep 08, 2011
yebblies
Sep 17, 2011
Walter Bright
July 20, 2011
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: nobody@puremagic.com
        ReportedBy: cbkbbejeap@mailinator.com


--- Comment #0 from Nick Sabalausky <cbkbbejeap@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: -------
July 20, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6352


Nick Sabalausky <cbkbbejeap@mailinator.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |regression


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 20, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6352


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies@gmail.com


--- Comment #1 from yebblies <yebblies@gmail.com> 2011-07-20 14:25:43 EST ---
This is essentially issue 3180, but the regression part is of course new.
Maybe 3180 should be elevated to regression?  I'm not really sure.
I have a patch for this, but I'm waiting for my fix to issue 3797 to be applied
first.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 20, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6352


Nick Sabalausky <cbkbbejeap@mailinator.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |3180


--- Comment #2 from Nick Sabalausky <cbkbbejeap@mailinator.com> 2011-07-19 21:30:20 PDT ---
I'll mark this as depending on issue 3180. That should be good enough. Other parts of 3180 aren't regressions, after all.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 02, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6352



--- Comment #3 from yebblies <yebblies@gmail.com> 2011-09-02 23:12:18 EST ---
Fixed for function literals with https://github.com/D-Programming-Language/dmd/commit/306df8eaa6f8a987f76f401a1e03d8edf1f1e2ae

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 08, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6352


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
           Platform|Other                       |All
         OS/Version|Windows                     |All


--- Comment #4 from yebblies <yebblies@gmail.com> 2011-09-08 23:41:34 EST ---
The fix for issue 3180 fixes this bug.

https://github.com/D-Programming-Language/dmd/pull/368

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 17, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6352


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #5 from Walter Bright <bugzilla@digitalmars.com> 2011-09-16 23:28:30 PDT ---
https://github.com/D-Programming-Language/dmd/commit/77bed134d06e6314c5b65465068f554b3f2c2e8d

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