Skip to content

Commit

Permalink
Better comment
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-strecker-sonarsource committed May 2, 2024
1 parent b29102b commit 70f5741
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -72,7 +72,9 @@ public abstract class ArgumentTracker<TSyntaxKind> : SyntaxTrackerBase<TSyntaxKi
descriptor.RefKind is not { } expectedRefKind // When null: No RefKind constraint was specified
|| ArgumentRefKind(argumentNode) is not { } actualRefKind // When null: In VB, the argument does not need ref/out keywords on the call side
|| expectedRefKind == actualRefKind
|| (expectedRefKind is RefKindEx.In && actualRefKind is RefKind.None or RefKind.Ref) // "in" RefKind is optional on the call side or can be "ref" instead
// For parameter ref kind "in", on the call side "in" is optional or can be "ref" instead
// For "ref readonly" parameters, "none", "in" and "ref" are allowed on the call side
|| (expectedRefKind is RefKindEx.In && actualRefKind is RefKind.None or RefKind.Ref)
|| (expectedRefKind is RefKindEx.RefReadOnlyParameter && actualRefKind is RefKind.None or RefKind.Ref or RefKindEx.In);

private static bool ParameterMatches(IParameterSymbol parameter, Func<IParameterSymbol, bool> parameterConstraint, Func<IMethodSymbol, bool> invokedMemberConstraint)
Expand Down

0 comments on commit 70f5741

Please sign in to comment.