title: Lambda parameter name (sometimes) conflicting with local name
body: <p>There are two projects, one is a library targeting .NET Standard 2.0, while the other is a console app targeting .NET Core 2.2.</p>
  
  <p>Now this piece of code is working on .NET Standard 2.0 library, but not on .NET Core 2.2.</p>
  
  <pre><code>for (int i = 0; i &lt; 1; i++) {
      var y = new int[1].First(i =&gt; i == 0); // Conflict i name error here in .NET Core 2.2.
      Console.WriteLine("Hello " + y);
  }
  </code></pre>
  
  <p>I understand <a href="https://stackoverflow.com/questions/29750618/lambda-parameter-conflicting-with-class-field-on-accessing-field-in-later-scope">from this question</a> that simple names should not have different meanings, and thus, even .NET Standard 2.0 library should give an error, but it is not. Why is this inconsistency?</p>
  
  <p>I have tried dotnet fiddle, and it seems to work on .NET Core 3.1 and Roslyn 3.4, but not .NET Framework 4.7.2, which is even more confusing. What is going on here?</p>
  
  <ul>
  <li><p>.Net Core 3.1 (passing) <a href="https://dotnetfiddle.net/Cc1hmk" rel="noreferrer">https://dotnetfiddle.net/Cc1hmk</a></p></li>
  <li><p>Roslyn 3.4 (passing) <a href="https://dotnetfiddle.net/megBiw" rel="noreferrer">https://dotnetfiddle.net/megBiw</a></p></li>
  <li><p>.NET Framework 4.7.2 (Compile error) <a href="https://dotnetfiddle.net/6PPqDs" rel="noreferrer">https://dotnetfiddle.net/6PPqDs</a></p></li>
  </ul>