Skip to content

Conversation

@1-1sam
Copy link
Contributor

@1-1sam 1-1sam commented Aug 13, 2025

This PR adds some todo tests for #16364 that test the following behavior:

  • An array element that was previously uninitialized is created at the correct index when assigned from a subroutine's @_ alias which modifies the element's original array. The element is within the array.
  • The same as the above but the element is outside of the array's range.
  • An array element that was previously uninitialized is created at the correct index when assigned from a foreach loop's $_ alias which modifies the element's original array.

The first test seems to pass, the other two do not.


  • This set of changes does not require a perldelta entry.

Copy link
Contributor

@khwilliamson khwilliamson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me except the test names should be distinguishable from each other.

And we discovered that when we move passing tests to an appropriate .t that their ticket number gets lost. So we are now asking to put the number in each test name as well. I'll shortly update the comments at the beginning of the file to say that. But here's one possibility for the name for your first test

'Array element created at correct index from subroutine @_ alias: GH 16364'

This commit adds some todo tests for GH 16364 that test the following
behavior:
* An array element that was previously uninitialized is created at the
  correct index when assigned from a subroutine's @_ alias which
  modifies the element's original array. The element is within the
  array.
* The same as the above but the element is outside of the array's
  range.
* An array element that was previously uninitialized is created at the
  correct index when assigned from a foreach loop's $_ alias which
  modifies the element's original array.
@khwilliamson khwilliamson dismissed their stale review August 19, 2025 02:24

fixed as suggested

@khwilliamson khwilliamson merged commit 01de43c into Perl:blead Aug 19, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants