-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
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.parameter packsFeature → generics: Parameter packsFeature → generics: Parameter packs
Description
Description
This may be related to #79008.
Reproduction
protocol Protocol {
static func ƒ<each T>() -> (repeat each T)
static subscript<each T>() -> (repeat each T) { get }
}
A pack of multiple values is fine:
func ƒ<P: Protocol>(_: P.Type) {
_ = P.ƒ() as (Void, Never)
_ = P[] as (Void, Never)
}
But fewer than that is a problem. These crash the compiler:
_ = P.ƒ() as Void
_ = P[] as Never
Expected behavior
All arities are usable.
Environment
swift-driver version: 1.115.1 Apple Swift version 6.0.3 (swiftlang-6.0.3.1.10 clang-1600.0.30.1)
Target: arm64-apple-macosx15.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.parameter packsFeature → generics: Parameter packsFeature → generics: Parameter packs