DMD can implicitly convert class pointer to the bool. Is it bug or terrible feature?

ilya-stromberg ilya-stromberg-2009 at yandex.ru
Sun Nov 24 11:16:30 PST 2013


On Sunday, 24 November 2013 at 18:41:32 UTC, Andrei Alexandrescu 
wrote:
> This is just speculation. It would have been helpful if 
> enabling -Wshadow uncovered at least a few bugs. Instead, it 
> just asked for a lot of code to be changed for no visible 
> benefit.

No, isn't just speculation.
If you already have working and tested code without `-Wshadow` 
flag it's really doesn't provide any solid benefits.
But in my case it helps because compiler prints error about 
missing identifier and I have to uncomment `bool` variable.


More information about the Digitalmars-d mailing list