19108, "bradcray", "maxloc/minloc reductions don't work when indices are strings", "2022-01-25T22:54:39Z"
Our current implementation of minloc/maxloc take a min() or max() of the idxType, I believe in order to come up with a placeholder/sentinel value for the location in the event that the reduction set is empty (?). However, when doing a minloc or maxloc over a domain whose idxType is
string (or anything else that doesn't support
max), this results in errors:
error: unresolved call 'max(type string)' $CHPL_HOME/modules/internal/ChapelTuple.chpl:393: note: this candidate did not match: max(type t) $CHPL_HOME/modules/internal/ChapelTuple.chpl:393: note: because where clause evaluated to false day14-maxlocstringinds.chpl:6: note: other candidates are: $CHPL_HOME/modules/standard/Types.chpl:734: note: max(type t) $CHPL_HOME/modules/standard/Types.chpl:737: note: max(type t) note: and 22 other candidates, use --print-all-candidates to see them
It seems as though we need to come up with some other way of generating this placeholder value.
Associated Future Test(s):
- Output of
chpl version 1.26.0 pre-release (56bd177336)