[Issue 8836] New: function called with argument types ((void function())) matches both f(void function() fn) and f(void delegate() dg)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 17 08:47:58 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8836

           Summary: function called with argument types ((void
                    function())) matches both f(void function() fn) and
                    f(void delegate() dg)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: luka8088 at owave.net


--- Comment #0 from luka8088 <luka8088 at owave.net> 2012-10-17 08:47:57 PDT ---
// http://dpaste.dzfl.pl/92347e75

import std.stdio;

void f (void function () fn) {}
void f (void delegate () dg) {}

void main () {
  f({ writeln("f"); });
}

-----

Compilation output:

/home/c713/c345.d(8): Error: function c345.f called with argument types:
((void function()))
matches both:
/home/c713/c345.d(4): c345.f(void function() fn)
and:
/home/c713/c345.d(5): c345.f(void delegate() dg)

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


More information about the Digitalmars-d-bugs mailing list