Skip to content

Commit 54f8096

Browse files
authored
Fix build errors
1 parent 5aa5454 commit 54f8096

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Framework/AspNetCoreAnalyzers/src/SourceGenerators/PublicTopLevelProgramGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
2929
TypeKind: TypeKind.Class,
3030
// If there are multiple partial declarations, then do nothing since we don't want
3131
// to trample on visibility explicitly set by the user
32-
DeclaringSyntaxReferences: [var singleSyntaxReference]
32+
DeclaringSyntaxReferences: { Length: 1 } declaringSyntaxReferences
3333
} &&
3434
// If the `Program` class is already declared in user code, we don't need to generate anything.
35-
singleSyntaxReference.GetSyntax(cancellationToken) is not ClassDeclarationSyntax
35+
declaringSyntaxReferences.Single().GetSyntax(cancellationToken) is not ClassDeclarationSyntax
3636
);
3737

3838
context.RegisterSourceOutput(internalGeneratedProgramClass, (context, result) =>

0 commit comments

Comments
 (0)