Skip to content

Commit

Permalink
Remove default value from SynthesizedParameterSymbol constructor to f…
Browse files Browse the repository at this point in the history
…ollow convention from source parameter symbols
  • Loading branch information
adamperlin committed Aug 11, 2022
1 parent c1d4482 commit 26375e1
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,8 @@ private SynthesizedParameterSymbol(
int ordinal,
RefKind refKind,
DeclarationScope scope,
ConstantValue? defaultValue,
string name)
: base(container, type, ordinal, refKind, scope, defaultValue, name)
: base(container, type, ordinal, refKind, scope, defaultValue: null, name)
{
}

Expand All @@ -221,9 +220,9 @@ public static ParameterSymbol Create(
ImmutableArray<CustomModifier> refCustomModifiers = default,
SourceComplexParameterSymbolBase? baseParameterForAttributes = null)
{
if (refCustomModifiers.IsDefaultOrEmpty && baseParameterForAttributes is null)
if (refCustomModifiers.IsDefaultOrEmpty && baseParameterForAttributes is null && defaultValue is null)
{
return new SynthesizedParameterSymbol(container, type, ordinal, refKind, scope, defaultValue, name);
return new SynthesizedParameterSymbol(container, type, ordinal, refKind, scope, name);
}

return new SynthesizedComplexParameterSymbol(
Expand Down

0 comments on commit 26375e1

Please sign in to comment.