[Chapel Merge] Next: fix incremental bug with deleted function

Branch: refs/heads/main
Revision: f88bb1f
Author: aconsroe-hpe
Link: Unavailable
Log Message:

Merge pull request #18769 from aconsroe-hpe/next-bug-deleted-function-pretty-half

Next: fix incremental bug with deleted function

reviewed by mppf

Adds a test showing that a deleted function is no longer returned as part of a resolution result.

The fix is thanks to mppf, with the underlying cause that a garbage value was being used for partial result even when a query needed to be recomputed.

Also included is:

  1. Fixing a memory leak (malloc without free in one code path)
  2. Completing a TODO for using an Iterable instead of for i

test-libchplcomp tests are passing

Modified Files:
M compiler/next/include/chpl/queries/Context-detail.h

M compiler/next/include/chpl/queries/Context.h
M compiler/next/include/chpl/queries/query-impl.h
M compiler/next/lib/parsing/parsing-queries.cpp
M compiler/next/lib/queries/ErrorMessage.cpp
M compiler/next/lib/resolution/resolution-queries.cpp
M compiler/next/lib/resolution/scope-queries.cpp
M compiler/next/test/queries/testRecursiveQuery.cpp
M compiler/next/test/resolution/testResolve.cpp

Compare: https://github.com/chapel-lang/chapel/compare/7467e3992c2b...f88bb1fb943f