Skip to content

Commit

Permalink
Update language
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffAshton committed Aug 17, 2023
1 parent 43daaa7 commit 73784b6
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,16 @@ private static void AnalyzeConversion(
INamedTypeSymbol constantAttribute
) {

IMethodSymbol method = conversion.OperatorMethod;
if( method is null ) {
IMethodSymbol @operator = conversion.OperatorMethod;
if( @operator is null ) {
return;
}
if( method.Parameters.Length != 1 ) {
if( @operator.Parameters.Length != 1 ) {
return;
}

// Parameter is not [Constant], so do nothing
IParameterSymbol parameter = method.Parameters[ 0 ];
// Operator parameter is not [Constant], so do nothing
IParameterSymbol parameter = @operator.Parameters[ 0 ];
if( !HasAttribute( parameter, constantAttribute ) ) {
return;
}
Expand All @@ -160,7 +160,7 @@ INamedTypeSymbol constantAttribute
return;
}

// Conversion argument is not constant, so report it
// Operand is not constant, so report it
context.ReportDiagnostic(
descriptor: Diagnostics.NonConstantPassedToConstantParameter,
location: operand.Syntax.GetLocation(),
Expand Down

0 comments on commit 73784b6

Please sign in to comment.