Skip to content

INamedType.ToDisplayString omits delegate's parameters #64632

@andriipatsula

Description

@andriipatsula

Version Used: 4.3.0

Steps to Reproduce:

SymbolDisplayFormat options:

var format = new SymbolDisplayFormat(
        globalNamespaceStyle: SymbolDisplayGlobalNamespaceStyle.Omitted,
        typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces,
        delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature,
        miscellaneousOptions: SymbolDisplayMiscellaneousOptions.UseSpecialTypes);

Code example:

namespace A
{
    public delegate bool SyntaxReceiverCreator(int a, bool b);
}

Expected Behavior:
as delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature is active, I expect INamedType.ToDisplayString(format) produces output:

bool SyntaxReceiverCreator(int a, bool b)

Actual Behavior:
INamedType.ToDisplayString(format) produces output (without parameters):

bool A.SyntaxReceiverCreator()

From parameter description:

SymbolDisplayDelegateStyle.NameAndSignature - Shows the name and the signature of the delegate (e.g. "void SomeDelegate(int x)").

Issue in arcade: dotnet/arcade#11232

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions