p-x9 / AliasMacro

🎭 A Swift macros for defining aliases for types, functions, variables, etc.
MIT License
30 stars 0 forks source link

Support for Protocol alias #15

Open p-x9 opened 12 months ago

p-x9 commented 12 months ago

Currently, the following uses are not available

@Alias("NewProtocolName")
protocol Protocol {}
p-x9 commented 11 months ago

protocol can only be defined in the global scope. However, PeerMacro cannot be used in the global scope with arbitrary specified in names.

https://github.com/apple/swift-evolution/blob/main/proposals/0389-attached-macros.md#restrictions-on-arbitrary-names

p-x9 commented 10 months ago

Nested Protocol

https://github.com/apple/swift-evolution/blob/main/proposals/0404-nested-protocols.md