The Swift Reflection API and what you can do with it

The Swift Reflection API and what you can do with it

The Mirror struct contains several types to help you identify the information you'd like to query.

[…]

Those are the supported types of the reflection API. As we saw earlier, reflection only requires an Any type, and there're many things in the Swift standard library that are of type Any but aren't listed in the DisplayStyle enum above. What happens when you try to reflect over one of those, say a closure?

[…]