Conditional conformance for variadic parameters #741
kyouko-taiga
started this conversation in
Language design
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sum
andTuple
are effectively variadic generic types. It should be possible to declare a conditional conformance or extension based on a constraint defined over each generic parameter. That would allow, among other things:Sum<T1, ..., Tn>
conform toExpressibleBy***Literal
when all its elements are; andTuple<T1, ..., Tn>
conform toEquatable
when all its elements are.These conformances may be synthesized before we support variadic parameters.
Beta Was this translation helpful? Give feedback.
All reactions