Skip to content

Commit 1bea5a6

Browse files
authored
Fix accessibility check
1 parent 675e6ac commit 1bea5a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
2525
// If the discovered `Program` type is not a class then its not
2626
// generated and has been defined in source, so we can skip it
2727
// If the program class is already public, we don't need to generate anything.
28-
DeclaredAccessibility: Accessibility.Public,
28+
DeclaredAccessibility: not Accessibility.Public,
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

0 commit comments

Comments
 (0)