Suboptimal error reporting of invalid argument to generic function #36775
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code produces two compilation errors.
Error 1
The first error looks great. The compiler points at the erroneous argument.
Error 2
In the second error, however, the compiler points at the function instead of the erroneous argument. This is no big problem in this case, as the function only takes one argument, and the argument has a very simple type. But in more complex functions, it might be hard to figure out which argument is problematic.
The text was updated successfully, but these errors were encountered: