File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/Compilers/CSharp/Portable/Binder Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -709,7 +709,10 @@ private BoundStatement BindDeclarationStatementParts(LocalDeclarationStatementSy
709709 // Check for duplicate modifiers in local declarations.
710710 // We call ToDeclarationModifiers here only to report duplicate modifier errors.
711711 // The actual modifier (const) is determined by node.IsConst below.
712- _ = node . Modifiers . ToDeclarationModifiers ( isForTypeDeclaration : false , diagnostics . DiagnosticBag ?? new DiagnosticBag ( ) ) ;
712+ if ( diagnostics . DiagnosticBag is { } bag )
713+ {
714+ _ = node . Modifiers . ToDeclarationModifiers ( isForTypeDeclaration : false , bag ) ;
715+ }
713716
714717 var typeSyntax = node . Declaration . Type ;
715718 bool isConst = node . IsConst ;
You can’t perform that action at this time.
0 commit comments