Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISymbol.ToDisplayString() bug #7454

Open
Phylum123 opened this issue Oct 21, 2024 · 0 comments
Open

ISymbol.ToDisplayString() bug #7454

Phylum123 opened this issue Oct 21, 2024 · 0 comments

Comments

@Phylum123
Copy link

Steps To Reproduce:

  1. Use the display format shown below:

var methodDisplayFormat = new SymbolDisplayFormat( typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces, genericsOptions: SymbolDisplayGenericsOptions.None, memberOptions: SymbolDisplayMemberOptions.IncludeParameters, parameterOptions: SymbolDisplayParameterOptions.IncludeModifiers | SymbolDisplayParameterOptions.IncludeType | SymbolDisplayParameterOptions.IncludeName, propertyStyle: SymbolDisplayPropertyStyle.ShowReadWriteDescriptor, localOptions: SymbolDisplayLocalOptions.IncludeType, kindOptions: SymbolDisplayKindOptions.IncludeMemberKeyword, delegateStyle: SymbolDisplayDelegateStyle.NameAndSignature, extensionMethodStyle: SymbolDisplayExtensionMethodStyle.StaticMethod, miscellaneousOptions: SymbolDisplayMiscellaneousOptions.UseSpecialTypes);

  1. Take a method symbol with a "ref" or "out" parameter and use ToDisplayString(methodDisplayFormat) and look at the resulting string

This will display everything correctly, however, if you remove 'SymbolDisplayParameterOptions.IncludeType' from parameterOptions, then the modifiers ("out", "ref", etc.) will no longer display.

Expected Results:

For the modifiers to display, regardless if type is displayed or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant