[Issue 14757] Wrong error message: Error: multi-dimensional slicing requires template opSlice

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 1 11:34:55 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14757

Timothee Cour <timothee.cour2 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2 at gmail.com

--- Comment #1 from Timothee Cour <timothee.cour2 at gmail.com> ---
forgot to add:
of course the error is that 'foobar()' doesn't compile, but the error message
provided completely hides that, and is confusing, since user did define
opSlice.
I'm guessing implementation uses something such as __traits(compiles, expr) to
check whether user defined the template and error gagging prevents showing it.

Either way, as it is, in larger programs, it can be very hard to figure out the
reason of the bug given poor compiler msg

--


More information about the Digitalmars-d-bugs mailing list