macro_prototype
macro_prototype copied to clipboard
Enhanced Type manipulation
So far, a type only exposes limited informations
It would be useful to add extra utilities, such as:
- converting a
runtimeTypeinto a type (similar toTypeCheckerfrom the analyzer) - expose an utility to obtain the nearest common interface between two types (like num for double+int, but Object for String+int)
- converting a
runtimeTypeinto a type (similar toTypeCheckerfrom the analyzer)
This one you can do from the builder instances in your macro - see the type{Reference|Declaration|Definition}Of apis. Or I think that is what you were asking for at least :).
- expose an utility to obtain the nearest common interface between two types (like num for double+int, but Object for String+int)
Ya I think we also want a utility to check if some type is exactly another type. Possibly with or without taking into account the generic type.