[Chapel Merge] Add union bad param index checking at compile-time

Branch: refs/heads/main
Revision: 1fd96d9bc22e69b070957b24cbf66841dd55d49c
Author: jabraham17
Link: Add union bad param index checking at compile-time by jabraham17 · Pull Request #28656 · chapel-lang/chapel · GitHub
Log Message:
Add union bad param index checking at compile-time (#28656)

Adds special bad param index for a union checking at compile time, as
without this the error error changes based on --fast being thrown or
not, which is confusing

[Not reviewed]

Compare: Comparing 60025afafffdbdb57d800fb93edf26b3f5461633...925c9058ebde97774666641749f366f8fd9cdc9c · chapel-lang/chapel · GitHub

Diff:
M modules/internal/ChapelUnion.chpl
M test/types/unions/accessByIndex-bad1.good
M test/types/unions/accessByIndex-bad2.good
https://github.com/chapel-lang/chapel/pull/28656.diff