chapel icon indicating copy to clipboard operation
chapel copied to clipboard

Prevent modification of const ref varargs, too

Open lydia-duncan opened this issue 5 months ago • 1 comments

Resolves #25901

Modifies the same place as the PRs for const and const in, but additionally needed a fix for moveSetConstFlagsAndCheck because the local tuple variable was using a PRIM_GET_MEMBER_VALUE instead of a PRIM_GET_MEMBER.

Also updates a couple of tests that were impacted by the change:

  • The varargs array test could reasonably be considered fulfilling the promise of the deprecation message it encountered previously.
  • Futurizes the DataFrame test. We believe it to be okay because the failure mode is accurate (we think chpl__buildAssociativeArrayExpr should still be generally using const for its varargs, and copying an owned class does modify the original) and was not caught before this change. Add test locking in that there's an alternate way to create an associative array of owned classes that doesn't use the associative array literal syntax. I also opened #26035 to track the future

Add tests locking in the fix for const ref. Covers both queried and unqueried numbers of arguments.

lydia-duncan avatar Sep 06 '24 22:09 lydia-duncan