diff --git a/CHANGELOG.md b/CHANGELOG.md index 999b722c5..ecba1482a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ ##### Bug Fixes -- None. +- Enums with the `@main` attribute are now retained. ## 2.21.0 (2024-06-15) diff --git a/Sources/SourceGraph/Mutators/EntryPointAttributeRetainer.swift b/Sources/SourceGraph/Mutators/EntryPointAttributeRetainer.swift index 6b1a5dc15..9e4ced96e 100644 --- a/Sources/SourceGraph/Mutators/EntryPointAttributeRetainer.swift +++ b/Sources/SourceGraph/Mutators/EntryPointAttributeRetainer.swift @@ -10,7 +10,7 @@ final class EntryPointAttributeRetainer: SourceGraphMutator { func mutate() { graph - .declarations(ofKinds: [.class, .struct]) + .declarations(ofKinds: [.class, .struct, .enum]) .lazy .filter { $0.attributes.contains("NSApplicationMain") ||