From 41bda28ddd5cbc64116b1a638915e8238bb94068 Mon Sep 17 00:00:00 2001 From: Timur Kelman Date: Wed, 24 Jul 2024 10:58:03 +0200 Subject: [PATCH] Always use RefConversion.PreAssigment for methods --- CodeConverter/CSharp/ExpressionNodeVisitor.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CodeConverter/CSharp/ExpressionNodeVisitor.cs b/CodeConverter/CSharp/ExpressionNodeVisitor.cs index 813f839b..9007ce94 100644 --- a/CodeConverter/CSharp/ExpressionNodeVisitor.cs +++ b/CodeConverter/CSharp/ExpressionNodeVisitor.cs @@ -1891,6 +1891,8 @@ RefConversion GetRefConversion(VBSyntax.ExpressionSyntax expression) } else if (symbolInfo is IFieldSymbol { IsConst: true } or ILocalSymbol { IsConst: true }) { return RefConversion.PreAssigment; + } else if (symbolInfo is IMethodSymbol) { + return RefConversion.PreAssigment; } if (DeclaredInUsing(symbolInfo)) return RefConversion.PreAssigment;