-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labelsThis issue needs more specific labels
Description
Description
Callbacks that take a parameter pack can not be stored
I am trying to achieve something similar to this but with parameter packs
struct Call<T,J> {
var callback: (T,J) -> String
init(callback: @escaping (T,J) -> String) {
self.callback = callback
}
}Reproduction
struct PackCall<each T> {
let callback: (repeat each T) -> Void
init(callback: @escaping (repeat each T) -> Void) {
self.callback = callback // X - Type of expression is ambiguous without a type annotation
}
}Expected behavior
it should work similar to the code in the description
Environment
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labelsThis issue needs more specific labels