From 5bf1c46969128ac979cd6f572b77e56655eea1bf Mon Sep 17 00:00:00 2001 From: Ian Leitch Date: Tue, 20 Aug 2024 12:24:03 +0200 Subject: [PATCH] Enums can also be entry points --- CHANGELOG.md | 2 +- Sources/SourceGraph/Mutators/EntryPointAttributeRetainer.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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") ||