[Chapel Merge] Report an error for a non-rectangular sparse domai

Branch: refs/heads/main
Revision: 0648f5b
Author: vasslitvinov
Link: Unavailable
Log Message:

Merge pull request #19056 from vasslitvinov/nonrect-sparse-err

Report an error for a non-rectangular sparse domains

Currently sparse subdomains are implemented only for rectangular domains,
including sparse subdomains of (simple and sparse) subdomains with
a rectangular domain as the final transitive parent.

This PR makes it a compile-time error to create a sparse subdomain type
that does not fit the above category. This way users will not encounter
unhelpful error messages when invoking some functionality (such as bulkAdd()
currently) on a non-rectangular sparse domain.

While there, introduce isRectangular(), isAssociative(), and isSparse()
methods on DSI domain classes (BaseDom and subclasses), to replace
some less-elegant code.

r: @lydia-duncan - thank you!

Modified Files:
A test/domains/compilerErrors/sparseSubdom-types.chpl

A test/domains/compilerErrors/sparseSubdom-types.good
A test/domains/compilerErrors/sparseSubdom-values.chpl
A test/domains/compilerErrors/sparseSubdom-values.good
A test/domains/methods/isXXX.chpl
A test/domains/methods/isXXX.good
M modules/internal/ChapelDistribution.chpl
M modules/internal/ChapelDomain.chpl

Compare: https://github.com/chapel-lang/chapel/compare/ea9cea23b52a...0648f5bb251c