From 98cda07a66ff23a11122d2119e6ed52ec15e335f Mon Sep 17 00:00:00 2001 From: Timur Kelman Date: Mon, 29 Jul 2024 10:44:13 +0200 Subject: [PATCH] pass empty ParameterList instead of null --- CodeConverter/CSharp/CommonConversions.cs | 2 +- CodeConverter/CSharp/ValidSyntaxFactory.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CodeConverter/CSharp/CommonConversions.cs b/CodeConverter/CSharp/CommonConversions.cs index eb46921d..3b540339 100644 --- a/CodeConverter/CSharp/CommonConversions.cs +++ b/CodeConverter/CSharp/CommonConversions.cs @@ -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 { diff --git a/CodeConverter/CSharp/ValidSyntaxFactory.cs b/CodeConverter/CSharp/ValidSyntaxFactory.cs index a55fbe3e..dca8fabc 100644 --- a/CodeConverter/CSharp/ValidSyntaxFactory.cs +++ b/CodeConverter/CSharp/ValidSyntaxFactory.cs @@ -83,7 +83,6 @@ public static MethodDeclarationSyntax CreateMethod(string newMethodName, TypeSyn { var modifiers = SyntaxFactory.TokenList(SyntaxFactory.Token(SyntaxKind.StaticKeyword)); var typeConstraints = SyntaxFactory.List(); - parameterList ??= SyntaxFactory.ParameterList(); var methodAttrs = SyntaxFactory.List();