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

2022-11-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

--- Comment #10 from ponce  ---
Thanks, it saves us lotsa time!

--


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

2022-10-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

RazvanN  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||razvan.nitu1...@gmail.com
 Resolution|--- |FIXED

--- Comment #9 from RazvanN  ---
The initial issue has been fixed, please do not reopen but file a new bug
report when new manifestations of the bug appear.

Now, for the overload example, I don't think that we should also take care of
that one too. It has been the philosophy of D to not be too verbose with error
messages. Imagine that if you have more than 2 functions in the overload set
you will be littered with all of the information. I think that the current
output is very nice and helpful:

test.d(6): Error: none of the overloads of `fun` are callable using argument
types `(double, double)`
test.d(1):Candidates are: `test.fun(int a, double b)`
test.d(3):`test.fun(double a, int b)`

I think that this is enough. Anyway, if you do not agree, please file a new
issue as this one has been fixed already.

--


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

2021-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

--- Comment #8 from Dlang Bot  ---
dlang/dmd pull request #12339 "[dmd-cxx] Backport fixes and trivial features
from upstream dmd" was merged into dmd-cxx:

- 8f461425adb1e69bf02abf88b4e73585316b05af by Nick Treleaven:
  [dmd-cxx] Fix Issue 15613, 11529: Show parameter mismatch and rvalue/lvalue
ref message

https://github.com/dlang/dmd/pull/12339

--


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

2021-04-01 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

--- Comment #7 from Dlang Bot  ---
@ibuclaw created dlang/dmd pull request #12339 "[dmd-cxx] Backport fixes and
trivial features from upstream dmd" mentioning this issue:

- [dmd-cxx] Fix Issue 15613, 11529: Show parameter mismatch and rvalue/lvalue
ref message

https://github.com/dlang/dmd/pull/12339

--


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

2018-02-26 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

Timothee Cour  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 CC||timothee.co...@gmail.com
 Resolution|FIXED   |---

--- Comment #6 from Timothee Cour  ---
re-opening, as the fix doesn't work with overloads:

```
--- main.d
void fun(int a, double b){}
version(with_overload)
void fun(double a, int b){}

void main(){
  fun(1.1, 2.1);
}
```

dmd main.d
Error: function test_all.fun(int a, double b) is not callable using argument
types (double, double)
cannot pass argument 1.1 of type double to parameter int a

dmd -version=with_overload main.d
Error: none of the overloads of fun are callable using argument types (double,
double), candidates are:
test_all.fun(int a, double b)
test_all.fun(double a, int b)

with -version=with_overload , it should show a similar error showing where
parameters mis-matcch

--


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

2018-01-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

--- Comment #5 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/48c6b49605e265e043e9a37fe6064ec603679619
Fix Issue 15613 - Parameter type mismatch error message not very helpful

Show the first argument that fails to match the function parameters.
This is also part of:
Issue 9631 - Error message not using fully qualified name when appropriate

https://github.com/dlang/dmd/commit/fcc69c18c439009508e1e57ea1f91970ffdf9b2b
Merge pull request #7554 from ntrel/qual-arg

Fix Issue 15613, 11529: Show parameter mismatch and rvalue/lvalue ref message
merged-on-behalf-of: Sebastian Wilzbach <sebi.wilzb...@gmail.com>

--


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

2018-01-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

github-bugzi...@puremagic.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--


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

2018-01-02 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

Nick Treleaven  changed:

   What|Removed |Added

 CC||bearophile_h...@eml.cc

--- Comment #4 from Nick Treleaven  ---
*** Issue 9056 has been marked as a duplicate of this issue. ***

--


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

2017-12-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

Nick Treleaven  changed:

   What|Removed |Added

 CC||johnnymar...@gmail.com

--- Comment #3 from Nick Treleaven  ---
*** Issue 16165 has been marked as a duplicate of this issue. ***

--


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

2017-12-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

Nick Treleaven  changed:

   What|Removed |Added

 CC||n...@geany.org

--- Comment #2 from Nick Treleaven  ---
https://github.com/dlang/dmd/pull/7554

It shows the argument that failed (and matching parameter) rather than
parameter index.

--


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

2016-01-26 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15613

Ketmar Dark  changed:

   What|Removed |Added

 CC||ket...@ketmar.no-ip.org

--- Comment #1 from Ketmar Dark  ---
or, at least, as a (possibly) simplier solution — prettyprint both declarations
on separate lines, aligning arguments (possibly ommiting argument names), so it
can be easily visually compared.

--