Skip to content

null initializer for non-nullable property (or field) should warn #26628

@jcouv

Description

@jcouv

Similar to #26626

public class C
{
    string x { get; set; } = null; // expect a warning
}

Found in nullable dogfood.

Note: there are some IDE tests (in CSharpDeclareAsNullableCodeFixTests) for this bug, which should be unskipped.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions