You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselffeatureA feature request or implementation
SR-2968 It is not allowed to declare protocol nested into another declaration
Issue Description:
When defining a protocol it's not uncommon to want to define new types for parameters or return values of the protocol methods or properties. The natural thing to do seems to be to want to nest these inside the protocol definition, but this is not possible in Swift. This limitation forces you to write types with names that are mangled to indicate their relevance to the protocol, which is just not ideal.
The text was updated successfully, but these errors were encountered:
Part of the concern here is whether it makes sense for the nested types to show up on all conforming types. This change would have to go through the Swift Evolution Process.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselffeatureA feature request or implementation
Additional Detail from JIRA
md5: ee99e81f57431f423d58b2c7021a728f
relates to:
Issue Description:
When defining a protocol it's not uncommon to want to define new types for parameters or return values of the protocol methods or properties. The natural thing to do seems to be to want to nest these inside the protocol definition, but this is not possible in Swift. This limitation forces you to write types with names that are mangled to indicate their relevance to the protocol, which is just not ideal.
The text was updated successfully, but these errors were encountered: