Branch: refs/heads/main
Revision: e20a37f
Author: vasslitvinov
Link: Write out one-tuples with a comma by vasslitvinov · Pull Request #19713 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #19713 from vasslitvinov/write-onetuple
Write out one-tuples with a comma
Prior to this change, one-tuples were printed out without the trailing comma.
This PR adds the comma, making the printed form match the source form.
For example:
var onetuple = (10,);
writeln(onetuple); // used to print (10)
Printing one-tuples without the trailing comma was most likely just an
oversight when the syntax was added in e9d2afa07e.
Looking through the changes in test outputs, i.e., .good/.bad files --
in some cases the outputs are now more verbose, making me feel
"do I really have to see all these commas now?". However none of the
affected tests had the intention to lock the previous behavior,
as far as I can tell. In particular, the output of primers/tuples.chpl
now pleasantly matches the syntax of the source code.
r: @mppf
Modified Files:
M doc/rst/language/spec/procedures.rst
M doc/rst/language/spec/tuples.rst
M modules/standard/ChapelIO.chpl
M test/arrays/deitz/parallelism/stream/test_stream_is_parallel.comm-none.good
M test/arrays/deitz/parallelism/stream/test_stream_is_parallel.good
M test/arrays/deitz/parallelism/stream/test_stream_no_fast_follow.comm-none.good
M test/arrays/deitz/parallelism/stream/test_stream_no_fast_follow.good
M test/arrays/deitz/parallelism/stream/test_whole_array_stream_is_parallel.comm-none.good
M test/arrays/deitz/parallelism/stream/test_whole_array_stream_is_parallel.good
M test/arrays/deitz/parallelism/stream/test_whole_array_stream_no_fast_followers.comm-none.good
M test/arrays/deitz/parallelism/stream/test_whole_array_stream_no_fast_followers.good
M test/arrays/userAPI/assocArray.good
M test/arrays/userAPI/assocDistributedHashed.comm-none.good
M test/arrays/userAPI/assocDistributedHashed.good
M test/arrays/userAPI/callExternArrTest.good
M test/classes/delete-free/lifetimes/tuple-vararg-in-lt-clause.good
M test/classes/delete-free/tuple-leak.good
M test/classes/ferguson/generic-inherit-bug1.good
M test/classes/initializers/base-class-generic-args.good
M test/classes/initializers/compilerGenerated/generics/tupleOfGeneric.good
M test/classes/initializers/promotion/initPromotion.good
M test/deprecated/regexMatchesArgs.good
M test/deprecated/regexTertiary.good
M test/distributions/bharshbarg/fastFollowerEquality.good
M test/distributions/bradc/blkCyc/blkCyc.comm-none.good
M test/distributions/bradc/blkCyc/blkCyc.good
M test/distributions/robust/arithmetic/trivial/test_dot_dims.good
M test/domains/bradc/orderPos.good
M test/functions/default-arguments/default-argument-private.good
M test/functions/deitz/iterators/test_instantiate_iterator3.good
M test/functions/deitz/iterators/test_instantiate_iterator3a.good
M test/functions/deitz/varargs/test_varargs12.good
M test/functions/diten/forParamDef.good
M test/regex/maxMatches.good
M test/release/examples/primers/tuples.good
M test/types/tuple/bradc/oneTuple.good
M test/types/tuple/deitz/destructure/test_destruct_var_arg_one_tuple.good
M test/types/tuple/deitz/homogTuple/test_htuple7.good
M test/types/tuple/diten/onetupleops.good
M test/types/tuple/ferguson/tuple-type-fn.good
M test/types/tuple/homog/boolTupleSize.bad
M test/types/tuple/vass/default-intents.bad
M test/types/type_variables/deitz/test_generic_vararg.good
M test/types/void/nothing-tuple.good
M test/users/ibertolacc/specified-return-type-tuple-array.good
Compare: https://github.com/chapel-lang/chapel/compare/5081fa877714...e20a37fe4729