Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/MinimalCli.SourceGenerator/GeneratorBindingsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private static void BindServiceDescriptor(this List<ParameterBinding> list, stri

private static string? GetSymbolDefaultValue(GeneratorAttributeSyntaxContext ctx, IParameterSymbol param)
{
static string FormatLiteral(object value)
static string FormatLiteral(object? value)
{
return value switch
{
Expand All @@ -245,7 +245,7 @@ static string FormatLiteral(object value)
};
}

if (param.HasExplicitDefaultValue && param.ExplicitDefaultValue is not null)
if (param.HasExplicitDefaultValue)
{
SyntaxReference? syntaxRef = param.DeclaringSyntaxReferences.FirstOrDefault();
if (syntaxRef?.GetSyntax() is ParameterSyntax paramSyntax && paramSyntax.Default is not null)
Expand Down
Loading