Dyno: simplify array type creation #27177
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes https://github.com/Cray/chapel-private/issues/7334, which required resolving:
To be merged after #27171. Clean diff: https://github.com/chapel-lang/chapel/pull/27177/files/47946ac16e576a8d92863f8cffb4efebccb2ff96..132e5f2c0931cfbd96003239e9499ab435abbbd3
The
dom
andeltType
fields are required as part of the DSI.In practice, they are relied on in various method on the
_array
builtin record:chapel/modules/internal/ChapelArray.chpl
Lines 832 to 834 in 47946ac
chapel/modules/internal/ChapelArray.chpl
Lines 819 to 820 in 47946ac
So, instead of special casing various well-known array classes to extract their
dom
andeltType
fields, simply adjust the InitResolver code to search for these required fields until they are found.While there, it seemed easy enough to add errors for when these things are missing.
Reviewed by @arifthpe -- thanks!
Testing
test/release/examples/primers/replicated.chpl
resolves