File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1884,14 +1884,14 @@ private RefConversion NeedsVariableForArgument(VBasic.Syntax.ArgumentSyntax node
18841884 RefConversion GetRefConversion ( VBSyntax . ExpressionSyntax expression )
18851885 {
18861886 var symbolInfo = GetSymbolInfoInDocument < ISymbol > ( expression ) ;
1887- if ( symbolInfo is IPropertySymbol propertySymbol
1888- // a property in VB.NET code can be ReturnsByRef if it's defined in a C# assembly the VB.NET code references
1889- && ! propertySymbol . ReturnsByRef && ! propertySymbol . ReturnsByRefReadonly ) {
1887+ if ( symbolInfo is IPropertySymbol { ReturnsByRef : false , ReturnsByRefReadonly : false } propertySymbol ) {
1888+ // a property in VB.NET code can be ReturnsByRef if it's defined in a C# assembly the VB.NET code references
18901889 return propertySymbol . IsReadOnly ? RefConversion . PreAssigment : RefConversion . PreAndPostAssignment ;
18911890 }
18921891 else if ( symbolInfo is IFieldSymbol { IsConst : true } or ILocalSymbol { IsConst : true } ) {
18931892 return RefConversion . PreAssigment ;
1894- } else if ( symbolInfo is IMethodSymbol ) {
1893+ } else if ( symbolInfo is IMethodSymbol { ReturnsByRef : false , ReturnsByRefReadonly : false } ) {
1894+ // a method in VB.NET code can be ReturnsByRef if it's defined in a C# assembly the VB.NET code references
18951895 return RefConversion . PreAssigment ;
18961896 }
18971897
You can’t perform that action at this time.
0 commit comments