[Issue 4288] New: Error on passing delegate to C linkage function.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jun 6 09:24:39 PDT 2010


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

           Summary: Error on passing delegate to C linkage function.
           Product: D
           Version: 1.057
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: adam.chrapkowski at gmail.com


--- Comment #0 from Adam Chrapkowski <adam.chrapkowski at gmail.com> 2010-06-06 09:24:38 PDT ---
Error occurs, when you try to use a delegate as a parameter to a C linked
function.

ex:
extern (C)
void c_func(void delegate() dg);
void d_func(void delegate() dg) { c_func(dg); }

Error: function test.c_func (void delegate()) does not match parameter types
(void delegate())
Error: cannot implicitly convert expression (dg) of type void delegate() to
void delegate()

-- 
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