digitalmars.D - Error deducing function
- Ignacious (12/12) Jan 13 2017 It would be EXTREMELY helpful if dmd would give a better result
- Adam D. Ruppe (3/4) Jan 13 2017 Yes, I agree entirely. This would be a HUGE usability bonus, far
- Ignacious (7/11) Jan 13 2017 And it should be very simple to do. as the compiler checks the
- Stefan Koch (5/18) Jan 22 2017 Actually it's not as easy since there can be many
It would be EXTREMELY helpful if dmd would give a better result than main.d(30): Error: template main.Do cannot deduce function from argument types !(1, string, int)(2, "adf"), candidates are: main.d(6): main.Do(int x, string y, alias Q)(int z, string q) Like, which arguments actually pass and which ones fail, etc. I know we are all suppose to be geniuses here but I flunked out of that class. Seems like the compiler knows where the error is so why can't it inform me a bit better than basically telling me there is an error and which lines it occurred on(cause that is all it really does in practice).
Jan 13 2017
On Friday, 13 January 2017 at 22:22:12 UTC, Ignacious wrote:Like, which arguments actually pass and which ones fail, etc.Yes, I agree entirely. This would be a HUGE usability bonus, far better than most the other things people work on...
Jan 13 2017
On Friday, 13 January 2017 at 22:57:09 UTC, Adam D. Ruppe wrote:On Friday, 13 January 2017 at 22:22:12 UTC, Ignacious wrote:And it should be very simple to do. as the compiler checks the arguments it reaches the argument that it finds invalid and it simply has to calculate the length in to the string to put something like a >> in front of the argument in the error string. Or simply give the index in to the argument or template list. Probably take a good programmer less than an hour to do.Like, which arguments actually pass and which ones fail, etc.Yes, I agree entirely. This would be a HUGE usability bonus, far better than most the other things people work on...
Jan 13 2017
On Friday, 13 January 2017 at 23:22:22 UTC, Ignacious wrote:On Friday, 13 January 2017 at 22:57:09 UTC, Adam D. Ruppe wrote:Actually it's not as easy since there can be many overloads/definitions of a template and printing out additional information for the failing arguments will clutter the few even more.On Friday, 13 January 2017 at 22:22:12 UTC, Ignacious wrote:And it should be very simple to do. as the compiler checks the arguments it reaches the argument that it finds invalid and it simply has to calculate the length in to the string to put something like a >> in front of the argument in the error string. Or simply give the index in to the argument or template list. Probably take a good programmer less than an hour to do.Like, which arguments actually pass and which ones fail, etc.Yes, I agree entirely. This would be a HUGE usability bonus, far better than most the other things people work on...
Jan 22 2017