Skip to content

Commit

Permalink
Merge pull request #1127 from TymurGubayev/minor/DontUseNull/1
Browse files Browse the repository at this point in the history
pass empty ParameterList instead of null
  • Loading branch information
GrahamTheCoder authored Jul 30, 2024
2 parents 871f088 + 98cda07 commit 1dd49d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion CodeConverter/CSharp/CommonConversions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public bool ShouldPreferExplicitType(VBSyntax.ExpressionSyntax exp,
equalsValueClauseSyntax = null;
} else {
var returnBlock = SyntaxFactory.Block(SyntaxFactory.ReturnStatement(adjustedInitializerExpr));
_typeContext.PerScopeState.Hoist(new HoistedFunction(GetInitialValueFunctionName(vbName), csTypeSyntax, returnBlock, null));
_typeContext.PerScopeState.Hoist(new HoistedFunction(GetInitialValueFunctionName(vbName), csTypeSyntax, returnBlock, SyntaxFactory.ParameterList()));
equalsValueClauseSyntax = null;
}
} else {
Expand Down
1 change: 0 additions & 1 deletion CodeConverter/CSharp/ValidSyntaxFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public static MethodDeclarationSyntax CreateMethod(string newMethodName, TypeSyn
{
var modifiers = SyntaxFactory.TokenList(SyntaxFactory.Token(SyntaxKind.StaticKeyword));
var typeConstraints = SyntaxFactory.List<TypeParameterConstraintClauseSyntax>();
parameterList ??= SyntaxFactory.ParameterList();

var methodAttrs = SyntaxFactory.List<AttributeListSyntax>();

Expand Down

0 comments on commit 1dd49d9

Please sign in to comment.