Constraining a union of enums

In reply to prang:

This is one of the clarifications made to the recent 1800-2017 LRM. The solver is not allowed to choose a value that lies outside the set of named values of the enum type. This is something constraint solvers were already doing, just not documented.

In your union, 0 is the only value common to the two enum types.

I’m not sure what you are trying to accomplish with the packed union; there might be alternatives like created lists of values with queues or associative arrays.