Skip to content

Commit 95a115f

Browse files
authored
Update remaining Predicate tests to use the #Predicate macro
1 parent 7272a47 commit 95a115f

File tree

3 files changed

+78
-528
lines changed

3 files changed

+78
-528
lines changed

Package.swift

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ let package = Package(
5858
name: "FoundationEssentials",
5959
dependencies: [
6060
"_CShims",
61+
"FoundationMacros",
6162
.product(name: "_RopeModule", package: "swift-collections"),
6263
],
6364
swiftSettings: [
@@ -117,10 +118,3 @@ package.targets.append(contentsOf: [
117118
], swiftSettings: availabilityMacros),
118119
])
119120
#endif
120-
121-
#if !os(Windows)
122-
// Using macros at build-time is not yet supported on Windows
123-
if let index = package.targets.firstIndex(where: { $0.name == "FoundationEssentials" }) {
124-
package.targets[index].dependencies.append("FoundationMacros")
125-
}
126-
#endif

Sources/FoundationEssentials/Predicate/Predicate.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ public struct Predicate<each Input> : Sendable {
2727
}
2828
}
2929

30-
#if compiler(>=5.9) && !os(Windows)
3130
@freestanding(expression)
3231
@available(macOS 14, iOS 17, tvOS 17, watchOS 10, *)
3332
public macro Predicate<each Input>(_ body: (repeat each Input) -> Bool) -> Predicate<repeat each Input> = #externalMacro(module: "FoundationMacros", type: "PredicateMacro")
34-
#endif
3533

3634
@available(macOS 14, iOS 17, tvOS 17, watchOS 10, *)
3735
extension Predicate {

0 commit comments

Comments
 (0)