dmd
dmd copied to clipboard
Fix error message location for incompatible function arguments
Closes: https://github.com/dlang/dmd/issues/21167
So the error message should point to the line with the problematic argument rather than the line where the function call starts. So here's what I did -
- Updated the
callMatchfunction intypesem.dto pass the argument's location to the error helper - Modified the error helper functions in
expressionsem.dandfuncsem.dto accept and use the argument's location also updated thefunctionResolvefunction intemplatesem.dto accept the modified error helper delegate - Also added a test case in
fail_compilation/fix21167.dto verify the fix