[Chapel Merge] Add support for param for loops over open enum ran

Branch: refs/heads/master
Revision: 2da026a
Author: bradcray
Log Message:

Merge pull request #17504 from bradcray/open-param-enum-ranges

Add support for param for loops over open enum ranges

[reviewed by @dlongnecke-cray]

This permits my two recent efforts (support for param for loops over enum ranges; support for enum ranges) to work together. The main step that was missing was to create a param version of the "order-to-enum" functions generated by the compiler for each enum (which also required conditionally changing the OOB-style halt() in the normal version into a compilerError() in the param version. In addition, I had to (or "got to"!) re-generalize the utility routines that support open interval ranges to stop excluding enums now that they work for param cases as well. Unfuturized a test to lock in the behavior, added a new test of the compilerError() and updated a few pre-existing tests to have them continue exercising the execution-time error (not their main reason for existing).

Modified Files:
A test/types/enum/operations/order/enumOrder4.chpl

A test/types/enum/operations/order/enumOrder4.compopts
A test/types/enum/operations/order/enumOrder4.good
R test/types/range/open/paramEnumRange.bad
R test/types/range/open/paramEnumRange.future
M compiler/passes/buildDefaultFunctions.cpp
M modules/internal/ChapelRange.chpl
M test/types/enum/operations/order/enumOrder.chpl
M test/types/enum/operations/order/enumOrder2.chpl
M test/types/enum/operations/order/enumOrder3.chpl

Compare: https://github.com/chapel-lang/chapel/compare/2f5c4f3e6b41...2da026a59466