[Issue 15613] New: Parameter type mismatch error message are not very helpful

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Jan 26 05:31:26 PST 2016


https://issues.dlang.org/show_bug.cgi?id=15613

          Issue ID: 15613
           Summary: Parameter type mismatch error message are not very
                    helpful
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: aliloko at gmail.com

Example of such an error:

--------------------

source\mymodule.d(244): Error: function distance.Distance.nextBuffer
(const(float)* inputLeft, const(float)* inputRight, float distanceDB, float*
outL, float* outR, int frames) is not callable using argument types
(const(float*), const(float*), float, float[], float[], int)

--------------------


One must mentally parse the entire message to find that parameter 3 and 4
should be float[] but are float*. It gets the worse the longer the function
prototype is.

It would be great if the compiler can do it and give the parameter index that
mismatches.

--


More information about the Digitalmars-d-bugs mailing list