www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9109] New: Regression: 2.053: Lazy Variadic Functions do not work with delegates

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9109

           Summary: Regression: 2.053: Lazy Variadic Functions do not work
                    with delegates
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com



17:17:24 PST ---
Taken from spec: dlang.org/function.html section Lazy Variadic Functions

void foo(int delegate()[] dgs ...) { }

void main()
{
    int x;
    int delegate() dg;
    foo( { return 1; }, { return 3+x; }, dg, null);
}

2.053: ok

2.054: Error: function test.foo (int delegate()[] dgs...) is not callable using
argument types (int delegate() pure nothrow,int delegate() nothrow,int
delegate(),void*)

...

2.060 has gotten even worse:

test.d(7): Error: function test.foo (int delegate()[] dgs...) is not callable
using argument types (int function() pure nothrow  safe,int delegate() nothrow
 safe,int delegate(),typeof(null))
test.d(7): Error: cannot implicitly convert expression (__lambda1) of type int
delegate() pure nothrow  safe to int
test.d(7): Error: cannot implicitly convert expression (__lambda2) of type int
delegate() nothrow  safe to int
test.d(7): Error: cannot implicitly convert expression (null) of type
typeof(null) to int

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 02 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9109


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid



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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 03 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9109


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



https://github.com/D-Programming-Language/dmd/commit/0a08e9556b0e327191cd3fdb5c9c19d4ac1101a8

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