Fix nullability annotations not being emitted on global:: prefixed type names

This commit is contained in:
Bartłomiej Dach
2022-12-04 14:11:44 +01:00
parent 7d796889e7
commit ebe85a59d8

View File

@@ -128,7 +128,11 @@ namespace osu.Framework.SourceGeneration
/// </para>
/// </remarks>
public static string? GetGlobalPrefixedTypeName(ITypeSymbol? type)
=> type?.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
=> type?.ToDisplayString(fullyQualifiedFormatWithNullableAnnotations);
private static SymbolDisplayFormat fullyQualifiedFormatWithNullableAnnotations { get; } =
SymbolDisplayFormat.FullyQualifiedFormat
.AddMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier);
public static string GetFullyQualifiedSyntaxName(TypeDeclarationSyntax syntax)
{