Thread overview
[Issue 17263] Issue diagnostic if mandatory template parameter is missing
Mar 17, 2017
Jonathan M Davis
Mar 18, 2017
Vladimir Panteleev
Mar 20, 2017
Lewis
March 17, 2017
https://issues.dlang.org/show_bug.cgi?id=17263

Jonathan M Davis <issues.dlang@jmdavisProg.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |issues.dlang@jmdavisProg.co
                   |                            |m

--- Comment #1 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
Yeah, this is one of those that's usually surprisingly hard to figure out. I usually end up doing a lot of examination of template constraints before I figure out that I simply forgot the !. It's a lot more obvious in this example, because it's short, but one you start chaining templates or having complicated predicates, it quickly becomes non-obvious that the ! is missing.

--
March 18, 2017
https://issues.dlang.org/show_bug.cgi?id=17263

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
                 CC|                            |thecybershadow@gmail.com

--
March 20, 2017
https://issues.dlang.org/show_bug.cgi?id=17263

Lewis <musicaljelly@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |musicaljelly@gmail.com

--- Comment #2 from Lewis <musicaljelly@gmail.com> ---
+1

I have made this mistake many times, and spent an embarrassingly long time trying to deduce the solution each time. A better compiler error would make the fix immediately obvious in these cases.

--
August 01
https://issues.dlang.org/show_bug.cgi?id=17263

--- Comment #3 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
LOL. I just ran into this issue again, wasted several minutes trying to figure out what was wrong, finally figured it out, and then decided to open an enhancement request. But voila, there's already one sitting here, and I commented on it previously. Honestly, I'd guess that this is quite possibly the dmd error message that would provide the most benefit in being improved. Maybe it gets harder to diagnose correctly when there are multiple overloads and they don't all necessarily have the same number of template arguments, but it at least _seems_ like it should be straightforward to figure out that the problem is probably the lack of a ! and indicate as much to the programmer, even if it's just a suggestion rather than an indicator that that's definitely the problem.

--
August 12
https://issues.dlang.org/show_bug.cgi?id=17263

Les De Ridder <dlang@lesderid.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dlang@lesderid.net

--