www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6352] New: Regression(2.054) Implicit pure/nothrow/ safe messes up delegate arrays

reply d-bugmail puremagic.com writes:
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



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: -------
Jul 19 2011
next sibling parent d-bugmail puremagic.com writes:
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: -------
Jul 19 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6352


yebblies <yebblies gmail.com> changed:

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



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: -------
Jul 19 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6352


Nick Sabalausky <cbkbbejeap mailinator.com> changed:

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



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: -------
Jul 19 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6352




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: -------
Sep 02 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
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



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: -------
Sep 08 2011
prev sibling parent d-bugmail puremagic.com writes:
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



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: -------
Sep 16 2011