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

monarchdo...@gmail.com changed:

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

--- Comment #1 from monarchdo...@gmail.com ---
Hum... seems like a limitation of *how* deprecation works. In particular, how
"is(typeof(...))" interacts with it. It's kind of like:

- "Do you have back?"
- "Yes."
- "I'd like to call back."
- "NO! YOU CAN'T! IT'S DEPRECATED!"

Case in point, reduced:

//----
import std.algorithm;

void main(string[] args)
{
    int[] a, b;
    splitter(a, b); //No warning here
    splitter(a, b).map!"a"(); //WARNING HERE
}
//----

Here, 'map' "thinks" (correctly or not) that it splitter is bidirectional, so
generates a 'back', which ends up calling a deprecated 'back'.

What's "funny" is that this only triggers in "deprecated features as warnings".
If you compile with "deprecated features as errors", then the problem actually
goes away. That said, you actually generate a different program. Which is
actually a bit disturbing, IMO.

--

Reply via email to