diff --git a/Package.resolved b/Package.resolved index 48c07b6..6fd9cd0 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-syntax.git", "state" : { - "revision" : "74203046135342e4a4a627476dd6caf8b28fe11b", - "version" : "509.0.0" + "revision" : "6ad4ea24b01559dde0773e3d091f1b9e36175036", + "version" : "509.0.2" } } ], diff --git a/Sources/SFSymbolsMacroImpl/SFSymbolsMacro.swift b/Sources/SFSymbolsMacroImpl/SFSymbolsMacro.swift index 6dcdf17..b4b1906 100644 --- a/Sources/SFSymbolsMacroImpl/SFSymbolsMacro.swift +++ b/Sources/SFSymbolsMacroImpl/SFSymbolsMacro.swift @@ -72,9 +72,9 @@ public struct SFSymbolMacro: MemberMacro { .init(node: Syntax(declaration), message: SFSymbolDiagnostic.notAnEnum) ]) } - let identifier = enumDecl.identifier - guard enumDecl.inheritanceClause?.inheritedTypeCollection.contains(where: { - $0.typeName.as(SimpleTypeIdentifierSyntax.self)?.name.text == "String" + let identifier = enumDecl.name + guard enumDecl.inheritanceClause?.inheritedTypes.contains(where: { + $0.type.as(IdentifierTypeSyntax.self)?.name.text == "String" }) ?? false else { throw DiagnosticsError(diagnostics: [ .init(node: Syntax(identifier), message: SFSymbolDiagnostic.missingStringProtocolConformance(symbol: identifier.text)) @@ -89,7 +89,7 @@ public struct SFSymbolMacro: MemberMacro { let idNode = $0.rawValue?.value.as(StringLiteralExprSyntax.self)?.segments.first { $0.as(StringSegmentSyntax.self) != nil } - let id = idNode?.as(StringSegmentSyntax.self)?.content.text ?? $0.identifier.text + let id = idNode?.as(StringSegmentSyntax.self)?.content.text ?? $0.name.text let syntax = Syntax(enumCase) return (id: id, node: syntax) }