[Chapel Merge] fix(dyno-resolver): updates for resolving logical

Branch: refs/heads/main
Revision: a2fce92
Author: arezaii
Link: fix(dyno-resolver): updates for resolving logical and, or binary ops by arezaii · Pull Request #20135 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #20135 from arezaii/dyno-resolve-where

fix(dyno-resolver): updates for resolving logical and, or binary ops

This PR fixes a small bug where we were using the wrong index
value to evaluate the Type of the RHS of a binary OpCall.
It also updates the param folding of binary params that are
used in logical "and" &&, and "or" || statements.

With this update, param folding will work properly in
the following cases:

var x: bool = true && false;
var y: bool = false || true;

Where previously the paramness of the initialization
expressions for x and y would have been lost.

TESTING:

  • make test-dyno passes all
  • paratest

reviewed by @mppf - thanks!

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

Modified Files:
M compiler/dyno/lib/resolution/Resolver.cpp

M compiler/dyno/test/resolution/testParamFolding.cpp

Compare: https://github.com/chapel-lang/chapel/compare/8d485971328f...a2fce92902b4