Avatar
expression macrosにもtype checkについて数点書かれてたけど、現状はfuncの引数みたいに型を明示的に書くから型チェックできたり、それ以外だと型が不明でも困らないケースしかないのかも
The main complexity of this future direction is in defining the APIs to be used by macro implementations to describe the Swift type system and related information. It would likely be a simplified form of a type checker's internal representation of types, but would need to remain stable. Therefore, while we feel that the addition of type information is a highly valuable extension for expression macros, the scope of the addition means it would best be introduced as a follow-on proposal.
https://github.com/apple/swift-evolution/blob/main/proposals/0382-expression-macros.md
This maintains proposals for changes and user-visible enhancements to the Swift Programming Language. - apple/swift-evolution