@drahardja this will be fixed in Swift 5.10: https://github.com/apple/swift-evolution/blob/main/proposals/0404-nested-protocols.md
Conversation
Notices
-
Embed this notice
Doug Gregor (dgregor79@sfba.social)'s status on Monday, 06-Nov-2023 03:44:50 JST Doug Gregor - clacke likes this.
-
Embed this notice
Dave Rahardja (drahardja@sfba.social)'s status on Monday, 06-Nov-2023 03:44:51 JST 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