https://issues.dlang.org/show_bug.cgi?id=16165
Issue ID: 16165
Summary: Better error message for mismatched function argument
types
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
Currently when a function call has mismatched argument types from the function
definition, an error message like this will get printed when compiling with
dmd:
Error: function myfunction(...) is not callable using argument types (...)
When a function has more than a couple arguments (like most Windows functions),
it can take a bit of effort to figure out which argument is incorrect. Adding
extra information like this: "Cannot convert argument 3 'message' from int to
string" or "you've called myfunction with 10 arguments but it only has 9",
would help developers save time trying to figure out what actually went wrong.
--