@@ -234,9 +234,9 @@ type.SpecialType is SpecialType.System_IntPtr ||
234234 /// </summary>
235235 /// <param name="node">The expression syntax node.</param>
236236 /// <returns>Returns the target method symbol, or null if it cannot be resolved.</returns>
237- protected IMethodSymbol ? GetTargetSymbol ( ExpressionSyntax node )
237+ protected static IMethodSymbol ? GetTargetSymbol ( Context cx , ExpressionSyntax node )
238238 {
239- var si = Context . GetSymbolInfo ( node ) ;
239+ var si = cx . GetSymbolInfo ( node ) ;
240240 if ( si . Symbol is ISymbol symbol )
241241 {
242242 var method = symbol as IMethodSymbol ;
@@ -255,7 +255,7 @@ type.SpecialType is SpecialType.System_IntPtr ||
255255 . Where ( method => method . Parameters . Length >= syntax . ArgumentList . Arguments . Count )
256256 . Where ( method => method . Parameters . Count ( p => ! p . HasExplicitDefaultValue ) <= syntax . ArgumentList . Arguments . Count ) ;
257257
258- return Context . ExtractionContext . IsStandalone ?
258+ return cx . ExtractionContext . IsStandalone ?
259259 candidates . FirstOrDefault ( ) :
260260 candidates . SingleOrDefault ( ) ;
261261 }
@@ -281,7 +281,7 @@ public static ExprKind UnaryOperatorKind(Context cx, ExprKind originalKind, Expr
281281 /// <param name="node">The expression.</param>
282282 public void AddOperatorCall ( TextWriter trapFile , ExpressionSyntax node )
283283 {
284- var @operator = GetTargetSymbol ( node ) ;
284+ var @operator = GetTargetSymbol ( Context , node ) ;
285285 if ( @operator is IMethodSymbol method )
286286 {
287287 var callType = GetCallType ( Context , node ) ;
@@ -312,9 +312,9 @@ public enum CallType
312312 /// <returns>The call type.</returns>
313313 public static CallType GetCallType ( Context cx , ExpressionSyntax node )
314314 {
315- var @operator = cx . GetSymbolInfo ( node ) ;
315+ var @operator = GetTargetSymbol ( cx , node ) ;
316316
317- if ( @operator . Symbol is IMethodSymbol method )
317+ if ( @operator is IMethodSymbol method )
318318 {
319319 if ( method . ContainingSymbol is ITypeSymbol containingSymbol && containingSymbol . TypeKind == Microsoft . CodeAnalysis . TypeKind . Dynamic )
320320 {
0 commit comments