[Chapel Merge] Enable pragma "last resort" var/parenless proc

Branch: refs/heads/main
Revision: 5f9ad90
Author: mppf
Link: Enable pragma "last resort" var/parenless proc by mppf · Pull Request #19372 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #19372 from mppf/scope-resolve-last-resort

Enable pragma "last resort" var/parenless proc

This is a spin-off from PR #19306. It enables pragma "last resort",
which is not a user-facing feature, to apply to variables and paren-less
procs in addition to regular procs and iters. This is of particular
interest because it offers an alternative solution to a problem that has
come up a few times when deprecating a module -- see e.g.:

  • #19279.

Resolves #19279.

Reviewed by @lydia-duncan - thanks!

  • [x] full local testing

    Modified Files:
    A test/modules/use/lastResortNoParensProc.chpl
    A test/modules/use/lastResortNoParensProc.good
    A test/modules/use/lastResortVar.chpl
    A test/modules/use/lastResortVar.good
    R test/library/packages/canCompileNoLink/testSockets.bad
    R test/library/packages/canCompileNoLink/testSockets.future
    M compiler/passes/scopeResolve.cpp

    Compare: Comparing b1287c975dcf...5f9ad906f707 · chapel-lang/chapel · GitHub