[Fact]
public void New_04()
{
var source = @"
class C
{
object Prop { get; set; }
void M<T>() where T : C, new()
{
var c = new T() { Prop = null }; // 1
_ = c.Prop.ToString(); // 2
}
}";
var comp = CreateCompilation(new[] { source }, options: WithNonNullTypesTrue());
comp.VerifyDiagnostics();
}
Currently, no warnings are reported, because we're not handling the object initializer for BoundNewT nodes.
Currently, no warnings are reported, because we're not handling the object initializer for
BoundNewTnodes.