Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.7
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand Down Expand Up @@ -35,7 +35,7 @@ let package = Package(
]),

// FoundationEssentials
.target(name: "FoundationEssentials", dependencies: ["_CShims"]),
.target(name: "FoundationEssentials", dependencies: ["_CShims"], swiftSettings: [.enableExperimentalFeature("VariadicGenerics")]),
.testTarget(name: "FoundationEssentialsTests", dependencies: [
"TestSupport",
"FoundationEssentials"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ public struct PredicateBindings {
// Store as a values as an array instead of a dictionary (since it is almost always very few elements, this reduces heap allocation and hashing overhead)
private var storage: [(id: PredicateExpressions.VariableID, value: Any)]

public init<T>(_ values: (PredicateExpressions.Variable<T>, T)) {
storage = [(values.0.key, values.1)]
public init<each T>(_ value: repeat (PredicateExpressions.Variable<each T>, each T)) {
storage = []
_ = (repeat storage.append(((each value).0.key, (each value).1)))
}

public subscript<T>(_ variable: PredicateExpressions.Variable<T>) -> T? {
Expand Down