Skip to content

The Simplifier removes Nullable for return types and parameters #11989

@andriipatsula

Description

@andriipatsula

Simplifier.ReduceAsync has second parameter OptionSet? optionSet = null, but I wasn't able to find any option
related to nullability. Plus, nullability for Plain Old Data like int, bool is "simplified" correctly, but for string, user defined types, interfaces - not.

public string? AssemblyPath { get { throw null; } }
public void WithAssemblyPath(string? path) { throw null; }

After roundtrip: source -> ISymbol-> SyntaxGenerator -> source:

public string AssemblyPath { get { throw null; } }
public void WithAssemblyPath(string path) { throw null; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-product-constructionIssues owned by the Product Construction team. Used to label epics and untriaged, loose issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions