www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8948] New: Make error message more readable when assigning function pointers

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

           Summary: Make error message more readable when assigning
                    function pointers
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: pull
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: andrej.mitrovich gmail.com
        ReportedBy: andrej.mitrovich gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-11-02
13:22:39 PDT ---
void main()
{
    void function() a;
    void function(int) b;
    b = a;
}

Before:
test.d(7): Error: cannot implicitly convert expression (a) of type void
function(int, float, string) to void function(float, int, string)

After:
test.d(7): Error: cannot implicitly convert expression (a) of type
  void function(int, float, string) 
to 
  void function(float, int, string)

This will make it easier to figure out why the types don't match.

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