From 4e4a78759b77e9087853b2f1fab1b1e7566c3e5b Mon Sep 17 00:00:00 2001 From: Joseph Duffy Date: Fri, 24 May 2024 20:56:31 +0100 Subject: [PATCH] Remove checks for Swift compiler >= 5.9.2 --- Sources/HashableMacro/Macros.swift | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Sources/HashableMacro/Macros.swift b/Sources/HashableMacro/Macros.swift index 01d42eb..6e319eb 100644 --- a/Sources/HashableMacro/Macros.swift +++ b/Sources/HashableMacro/Macros.swift @@ -32,15 +32,11 @@ import HashableMacroFoundation /// properties that contribute to the `Hashable` conformance the macro will /// produce a warning. When `true` this warning is suppressed. When `false` /// the warning will be elevated to an error. -#if compiler(>=5.9.2) @attached( - extension, - conformances: Hashable, Equatable, NSObjectProtocol, + extension, + conformances: Hashable, Equatable, NSObjectProtocol, names: named(hash(into:)), named(==), named(hash), named(isEqual(_:)), named(isEqual(to:)), arbitrary ) -#else -@attached(extension) -#endif public macro Hashable( finalHashInto: Bool = true, isEqualToTypeFunctionName: IsEqualToTypeFunctionNameGeneration = .automatic, @@ -63,12 +59,8 @@ public macro Hashable( /// - parameter allowEmptyImplementation: When `nil` (default) and there are no /// properties that contribute to the `Hashable` conformance the macro will /// produce a warning. When `true` this warning is suppressed. When `false` -/// the warning will be elevated to an error. -#if compiler(>=5.9.2) +/// the warning will be elevated to an error. @attached(extension, conformances: Hashable, Equatable, names: named(hash), named(==)) -#else -@attached(extension) -#endif public macro Hashable( finalHashInto: Bool = true, allowEmptyImplementation: Bool? = nil