Skip to content

Support if pattern in "use null coalescing assignment" refactoring  #32985

@genlu

Description

@genlu

Currently "use null coalescing assignment" refactoring only triggers for patterns like

x = x ?? y;

It'd be nice to expand the support to if patterns

if (x == null)
{
    x = y;
}

if (x is null)
{
    x = y;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEFeature RequestIDE-CodeStyleBuilt-in analyzers, fixes, and refactoringshelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions