[Chapel Merge] dyno: resolve MultiDecls and further improve Tuple

Branch: refs/heads/main
Revision: 792a5ca
Author: mppf
Link: dyno: resolve MultiDecls and further improve Tuple support by mppf · Pull Request #19335 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19335 from mppf/dyno-tuple-2

dyno: resolve MultiDecls and further improve Tuple support

This PR takes several steps to improve the dyno resolver:

  • pulls much of Resolver::exit(const NamedDecl* decl) out into new
    helper functions, checkForKindError, getTypeForDecl,
    resolveNamedDecl, to help with the following steps
  • also to help with the following steps, adds resolveGeneratedCall
    which works with a CallInfo only where there is no Call anywhere
    (because it is added by the compiler)
  • to aid debugging, improve CallInfo::stringify
  • resolve types for MultiDecls (e.g. var a, b, c: int) including
    MultiDecls containing TupleDecls (see #19340)
  • resolve types for TupleDecls (e.g. var (a,b) = f()) including as
    function formals
  • resolve unpacking tuples on assignment (e.g. (a, b) = f())
  • resolve tuple expansion when included in a Call
  • port over canCoerceTuples to allow tuple conversions on function
  • add tests of the above functionality

Reviewed by @dlongnecke-cray - thanks!

Modified Files:
A compiler/dyno/test/resolution/testMultiDecl.cpp

M compiler/dyno/include/chpl/resolution/can-pass.h
M compiler/dyno/include/chpl/resolution/resolution-queries.h
M compiler/dyno/include/chpl/resolution/resolution-types.h
M compiler/dyno/include/chpl/types/TupleType.h
M compiler/dyno/lib/resolution/Resolver.cpp
M compiler/dyno/lib/resolution/Resolver.h
M compiler/dyno/lib/resolution/can-pass.cpp
M compiler/dyno/lib/resolution/resolution-queries.cpp
M compiler/dyno/lib/resolution/resolution-types.cpp
M compiler/dyno/lib/types/TupleType.cpp
M compiler/dyno/test/resolution/CMakeLists.txt
M compiler/dyno/test/resolution/testTuples.cpp

Compare: https://github.com/chapel-lang/chapel/compare/097e4fc9b7bb...792a5caff15b