Skip to content

Commit

Permalink
Remove checks for Swift compiler >= 5.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephDuffy committed May 24, 2024
1 parent 89c034b commit 4e4a787
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions Sources/HashableMacro/Macros.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 4e4a787

Please sign in to comment.