Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
if (region.Contains (x, y))
return region.Contains (x, y) ? true : false;
But it should be
return region.Contains (x, y);
the next one should be recognized by another issue - I've a redundant conditional operator for exactly this case.
I don't know if it's worth putting the logic in the replace with return fix - I'll look what r# does in that case :)
Yeah, the other issue did show up, it just seemed strange that the first issue created such obviously redundant code.
But generally I don't think it's a good idea to let the code issues optimize the code to the end because I don't want that the user loses track of what's going on. Therefore it's often better to let it do step by step.
However in that special case I don't see any reason to generate the cond ? true : false branch. I hope nobody gets confused by this very simple case :)