Handle abbreviated union types for code generation

Fixes #701