-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Area-CompilersFeature - 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
using System.Runtime.CompilerServices;
[module: NonNullTypes]
class A { }
class B<T> { }
class C
{
static void F(B<A?> x, B<A> y, B<A>? z)
{
var a = new[] { x, y! }; // warning
var w = z ?? x!; // warning
}
}(9,28): warning CS8619: Nullability of reference types in value of type 'B<A>'
doesn't match target type 'B<A?>'.
(10,22): warning CS8619: Nullability of reference types in value of type 'B<A?>'
doesn't match target type 'B<A>'.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-CompilersFeature - 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