[Chapel Merge] Fix 'Futures' module usage of procedure pointers

Branch: refs/heads/main
Revision: a40b72dae21b518caf17585837b32b13d2697519
Author: benharsh
Link: Fix 'Futures' module usage of procedure pointers by benharsh · Pull Request #28732 · chapel-lang/chapel · GitHub
Log Message:
Fix 'Futures' module usage of procedure pointers (#28732)

This module needs to be updated to use procedure pointers, which do not
support a means to get the procedure's return type. Previously
first-class functions could rely on a .retType method.

Also fixes an infer-const-refs bug.

[reviewed-by @dlongnecke-cray]

Compare: Comparing 6fd65a8db9dcd6803b1824c7eb6e68d0a1b54343...7bdec365274cdc45a55d0b80d58376f7d3f7724f · chapel-lang/chapel · GitHub

Diff:
M compiler/optimizations/inferConstRefs.cpp
M modules/packages/Futures.chpl
https://github.com/chapel-lang/chapel/pull/28732.diff