Skip to content

SymbolDisplay should respect SymbolDisplayCompilerInternalOptions.IncludeNonNullableTypeModifier for class constraint  #29838

@AlekseyTs

Description

@AlekseyTs

When SymbolDisplayCompilerInternalOptions.IncludeNonNullableTypeModifier is set and "TypeParameterSymbol.ReferenceTypeConstraintIsNullable == true", the class constraint should have an ExclamationToken. I.e. the output should look like class!.

Relevant code is in private void AddTypeParameterConstraints(ImmutableArray<ITypeSymbol> typeArguments).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions