Skip to content

Commit 4c3ba54

Browse files
committed
fix: default version fix.
1 parent 70527d6 commit 4c3ba54

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/libraries/TedToolkit.RoslynHelper/Names/BaseName.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ private protected BaseName(T symbol)
1616
Symbol = symbol;
1717
_lazyFullName = new Lazy<string>(() => symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
1818
_lazyFullNameNull = new Lazy<string>(() => symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat
19-
.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier |
20-
SymbolDisplayMiscellaneousOptions.ExpandNullable)));
19+
.WithMiscellaneousOptions(SymbolDisplayMiscellaneousOptions.IncludeNullableReferenceTypeModifier)));
2120
_lazyFullNameNoGlobal = new Lazy<string>(() => symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat
2221
.WithGlobalNamespaceStyle(SymbolDisplayGlobalNamespaceStyle.Omitted)));
2322
_lazyMiniName = new Lazy<string>(() => symbol.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat));

src/libraries/TedToolkit.RoslynHelper/Names/ParameterName.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,11 @@ public ParameterSyntax ParameterSyntax
8888
var type = parameter.Type;
8989

9090
if (value == null)
91-
return type.IsReferenceType
92-
? LiteralExpression(SyntaxKind.NullLiteralExpression)
93-
: LiteralExpression(SyntaxKind.DefaultLiteralExpression);
91+
{
92+
return type.IsValueType
93+
? LiteralExpression(SyntaxKind.DefaultLiteralExpression)
94+
: LiteralExpression(SyntaxKind.NullLiteralExpression);
95+
}
9496

9597
switch (type.SpecialType)
9698
{

0 commit comments

Comments
 (0)