You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#nullable enable
usingSystem.Collections.Generic;usingSystem.Linq;classMyClass{staticvoidMethod(){_=fromMyClassitem1inEnumerate()selectitem1;foreach(MyClassitem2inEnumerate())// ~~~~~ Warning CS8600 Converting null literal or possible null value to non-nullable type.{}}staticIEnumerable<MyClass?>Enumerate(){thrownewNotImplementedException();}}
Expected Behavior:
CS8600 is reported for both item1 and item2.
Actual Behavior:
CS8600 is only reported for item2.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. It's a known issue/gap at the moment. We're still trying to figure out how to address it.
Closing as duplicate of #29863 (Implement nullability analysis in LINQ queries)
Version Used: Visual Studio 2019 Version 16.6.1
Steps to Reproduce:
Expected Behavior:
CS8600 is reported for both
item1
anditem2
.Actual Behavior:
CS8600 is only reported for
item2
.The text was updated successfully, but these errors were encountered: