Code analysis regression in 2019.3.2 "Expression is always false"

Answered

The following code in a NRT checked file following the 2019.3.2 update results in a "The expression is always false" warning.

if (new object[] { }.FirstOrDefault() == null)
{
    Console.WriteLine("Oh wait.");
}

0
4 comments

@Alex thanks for the feedback. The problem will be fixed in 2020.1 EAP1 build which we're going to release next week.

Thank you for your help and have a nice day!

0
Avatar
Permanently deleted user

Thank you for your reply Maria 👍

0

It has been fixed in Rider 2019.3.3, thanks!

0

Cedric Luthi thank you for letting us know that 2019.3.3 works fine for you, have a nice day!

0

Please sign in to leave a comment.