[Issue 12522] New: (void delegate() f) is not callable using argument types (void function() pure nothrow @safe)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 4 23:14:15 PDT 2014


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 at puremagic.com
        ReportedBy: tcdknutson at gmail.com


--- Comment #0 from Dylan Knutson <tcdknutson at 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: -------


More information about the Digitalmars-d-bugs mailing list