-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersBugFeature - Nullable Reference TypesNullable Reference TypesNullable Reference TypesResolution-FixedThe bug has been fixed and/or the requested behavior has been implementedThe bug has been fixed and/or the requested behavior has been implemented
Milestone
Description
yield return null; should generate warning: cannot convert null to non-nullable reference:
using System.Collections.Generic;
class C
{
static IEnumerable<object> F()
{
yield return null;
}
static IEnumerable<T> G<T>() where T : class
{
yield return null;
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersBugFeature - Nullable Reference TypesNullable Reference TypesNullable Reference TypesResolution-FixedThe bug has been fixed and/or the requested behavior has been implementedThe bug has been fixed and/or the requested behavior has been implemented