TEnumParameter has no side effects
add pf_ignore_unsafe_cast and use it to optimize in promote_complex_rhs (closes #2175)