[Chapel Merge] re-order evaluation in scopeResolve, fixes some pa

Branch: refs/heads/main
Revision: f31182b
Author: arezaii
Link: re-order evaluation in scopeResolve, fixes some parse bugs by arezaii · Pull Request #18874 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #18874 from arezaii/primer-parsing

re-order evaluation in scopeResolve, fixes some parse bugs

This PR fixes a small bug in the compiler's scope resolution pass
which caused some internal modules to fail to compile when using
the --compiler-library-parser flag to build various primers.

Initially, this started as an investigation into why parsing
ChapelHashtable.chpl would fail to compile after converting
the uast. It is a happy coincidence that this change also fixed
issues with parsing ChapelTaskDataHelp, OwnedObject,
and SharedObject.

TESTING:

  • [x] full paratest
  • [x] chpl primer tests pass with --compiler-library-parser

Reviewed by @mppf

Signed-off-by: arezaii ahmad.rezaii@hpe.com

Modified Files:
M compiler/parser/parser.cpp

M compiler/passes/scopeResolve.cpp

Compare: https://github.com/chapel-lang/chapel/compare/d6b6330b1f4b...f31182b1e909