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.");
}

2 comments
Comment actions Permalink

@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
Comment actions Permalink

Thank you for your reply Maria 👍

0

Please sign in to leave a comment.