I know there are many questions regarding introspection in Swift, but I couldn't find a clear answer for mine:
Is there a way to know if a variable of type Any (a function parameter for instance) is an enum?
I tried myVar is enum, myVar is enum.self, myVar is enum.Type, ...
I didn't worked obviously (I didn't had much hope anyway).
iswill work to test if your var is of that type. If you think you have to know whether a type was created as an enumeration, I imagine you are thinking about your problem incorrectly. Perhaps ask your question again after taking a step up the abstraction ladder. - Asa