public static void ReportCannotApplyUnaryOperator(this ICollection <Diagnostic> diagnostics, TextSpan span, UnaryOperatorKind operatorKind, Type type) { var operatorName = operatorKind.ToDisplayName(); var argumentTypeName = type.ToDisplayName(); diagnostics.Report(span, DiagnosticId.CannotApplyUnaryOperator, operatorName, argumentTypeName); }