title: Why do I get dereference of a possibly null reference warning when using non-short-circuit AND operator?
body: <p>I have a method like this, which is a simplified version of some logic in the production code:</p>
  
  <pre><code>static void Foo(int a, int b, string x, string y)
  {
       if (a &gt; 100 &amp;&amp; b &lt; 50 &amp;&amp; (x != null) &amp; (y != null))
       {
            Console.WriteLine(y.Length);
       }
  }
  </code></pre>
  
  <p>I get a "Dereference of a possibly null reference" error when accessing the <code>y.Length</code>.</p>
  
  <p>If I change <code>&amp;</code> to <code>&amp;&amp;</code>, the warning goes away. I couldn't figured it out why at first glance, then I thought it may be because the <code>&amp;</code> operator is overloadable, so the behaviour might change and possibly it could evaluate to <code>true</code> even when the <code>y</code> is null. Is my assumption correct or am I missing something else?</p>
  
  <p>Note: I can reproduce this in an app that targets .NET Core 3.1 or .NET Standard 2.0 using Visual Studio 2019.</p>