www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12522] New: (void delegate() f) is not callable using argument types (void function() pure nothrow safe)

https://d.puremagic.com/issues/show_bug.cgi?id=12522

           Summary: (void delegate() f) is not callable using argument
                    types (void function() pure nothrow  safe)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: tcdknutson gmail.com


--- Comment #0 from Dylan Knutson <tcdknutson gmail.com> 2014-04-04 23:14:08
PDT ---
This code fails to compile, but should: 

```
void real_func(void delegate() f) {}

// this SHOULD just forward arg as if real_func was called directly
auto forward(T)(T arg) { real_func(arg); }

void main() {
    // fails (shouldn't) 
    forward(() {});

    // doesn't fail
    // real_func(() {});
}
```

related dpaste: http://dpaste.dzfl.pl/dbe351629838

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