www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std/typecons.d(2010:36)[warn]: Left side of logical or is identical

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
I'm seeing this in the CI runs, but the line is actually not in error:

https://github.com/dlang/phobos/blob/master/std/typecons.d#L2010

Where would be the problem?


Andrei
Apr 02 2018
parent Stefan Koch <uplink.coder googlemail.com> writes:
On Monday, 2 April 2018 at 16:46:39 UTC, Andrei Alexandrescu 
wrote:
 I'm seeing this in the CI runs, but the line is actually not in 
 error:

 https://github.com/dlang/phobos/blob/master/std/typecons.d#L2010

 Where would be the problem?


 Andrei
I guess it's parsed as a comma expression, which would put U as the expression result. I think making an alias U2 = U; and putting that in the rhs would be sufficient. Given that it is dscanner who is complaining and not dmd. In which cause you'd have to nest the static ifs.
Apr 02 2018