having constructor cast use union match
replacing identifier path parts list with union type