Repository: dotnet/roslyn
File: src/Compilers/CSharp/Portable/Binder/Binder_Statements.cs (C#)

Code before:
                    else
                    {
                        return BindToNaturalType(argument, diagnostics);
                    }
                }
                else if (!conversion.IsImplicit || !conversion.IsValid)
                {
                    if (!badAsyncReturnAlreadyReported)
                    {
                        RefKind unusedRefKind;
                        if (IsEffectivelyGenericTaskReturningAsyncMethod()
                            && TypeSymbol.Equals(argument.Type, this.GetCurrentReturnType(out unusedRefKind), TypeCompareKind.ConsiderEverything2))
                        {
                            // Since this is an async method, the return expression must be of type '{0}' rather than '{1}'
                            Error(diagnostics, ErrorCode.ERR_BadAsyncReturnExpression, argument.Syntax, returnType, argument.Type);
                        }
                        else
                        {
                            var errorCount = diagnostics.DiagnosticBag?.AsEnumerable()
                                .Count(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error) ?? 0;

                            GenerateImplicitConversionError(diagnostics, argument.Syntax, conversion, argument, returnType);

                            var updatedErrorCount = diagnostics.DiagnosticBag?.AsEnumerable()
                                .Count(diagnostic => diagnostic.Severity == DiagnosticSeverity.Error) ?? 0;
                            hasImplicitConversionError = errorCount < updatedErrorCount;

                            if (this.ContainingMemberOrLambda is LambdaSymbol)
                            {
                                ReportCantConvertLambdaReturn(argument.Syntax, diagnostics);
                            }
                        }
                    }
                }
            }

            return CreateConversion(argument.Syntax, argument, conversion, isCast: false, conversionGroupOpt: null, InConversionGroupFlags.Unspecified, returnType, diagnostics, hasImplicitConversionError);
        }

        private BoundTryStatement BindTryStatement(TryStatementSyntax node, BindingDiagnosticBag diagnostics)
        {
            Debug.Assert(node != null);

            var tryBlock = BindEmbeddedBlock(node.Block, diagnostics);
            var catchBlocks = BindCatchBlocks(node.Catches, diagnostics);
            var finallyBlockOpt = (node.Finally != null) ? BindEmbeddedBlock(node.Finally.Block, diagnostics) : null;
            return new BoundTryStatement(node, tryBlock, catchBlocks, finallyBlockOpt);
        }

        private ImmutableArray<BoundCatchBlock> BindCatchBlocks(SyntaxList<CatchClauseSyntax> catchClauses, BindingDiagnosticBag diagnostics)
        {

Review comment (suggestion):
Consider an alternative of simply changing ```diagnostics``` to discarded bag if we are not interested in any additional diagnostics. #Closed

Code after:
                    }
                    else
                    {
                        return BindToNaturalType(argument, diagnostics);
                    }
                }
                else if (!conversion.IsImplicit || !conversion.IsValid)
                {
                    if (!badAsyncReturnAlreadyReported)
                    {
                        RefKind unusedRefKind;
                        if (IsEffectivelyGenericTaskReturningAsyncMethod()
                            && TypeSymbol.Equals(argument.Type, this.GetCurrentReturnType(out unusedRefKind), TypeCompareKind.ConsiderEverything2))
                        {
                            // Since this is an async method, the return expression must be of type '{0}' rather than '{1}'
                            Error(diagnostics, ErrorCode.ERR_BadAsyncReturnExpression, argument.Syntax, returnType, argument.Type);
                        }
                        else
                        {
                            var conversionDiagnostics = BindingDiagnosticBag.GetInstance(diagnostics);
                            GenerateImplicitConversionError(conversionDiagnostics, argument.Syntax, conversion, argument, returnType);

                            hasImplicitConversionError = conversionDiagnostics.AccumulatesDiagnostics && conversionDiagnostics.HasAnyResolvedErrors();
                            diagnostics.AddRangeAndFree(conversionDiagnostics);

                            if (this.ContainingMemberOrLambda is LambdaSymbol)
                            {
                                ReportCantConvertLambdaReturn(argument.Syntax, diagnostics);
                            }
                        }
                    }
                }
            }

            return CreateConversion(
                argument.Syntax,
                argument,
                conversion,
                isCast: false,
                conversionGroupOpt: null,
                InConversionGroupFlags.Unspecified,
                returnType,
                hasImplicitConversionError
                    ? BindingDiagnosticBag.Discarded
                    : diagnostics);
        }

        private BoundTryStatement BindTryStatement(TryStatementSyntax node, BindingDiagnosticBag diagnostics)
        {
            Debug.Assert(node != null);