Allow toComplexType for all platform
Format
Optimize for macro
Fix typo
Merge pull request #3264 from qifun/cross-platform-toComplexType

Provide `TypeTools.toComplexType` for all platforms