@drahardja this will be fixed in Swift 5.10: https://github.com/apple/swift-evolution/blob/main/proposals/0404-nested-protocols.md
Conversation
Notices
-
Doug Gregor (dgregor79@sfba.social)'s status on Sunday, 05-Nov-2023 18:36:23 UTC Doug Gregor - Santa Claes 🇸🇪ðŸ‡ðŸ‡°ðŸŽ… likes this.
-
Dave Rahardja (drahardja@sfba.social)'s status on Sunday, 05-Nov-2023 18:36:27 UTC Dave Rahardja I continue to find #Swift’s namespacing rules funny. Like declaring
class Foo { enum E { ... } }
is fine, but
class Foo { protocol Delegate { ... } }
is not.
But you could declare a FooDelegate, and declare a typealias Delegate = FooDelegate inside Foo…
It’s just kinda odd. I wish namespacing were more uniform.
In conversation permalink