Skip to content

Conversation

n3A87
Copy link

@n3A87 n3A87 commented Oct 26, 2024

Fixes #6108

Comment on lines 201 to 203
if (loopCount < getStartIndex()) {
loopCount = getStartIndex();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add a test case to cover the change?
It looks suspicious to call getStartIndex() twice as it might produce different results on every call.

Copy link
Author

Choose a reason for hiding this comment

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

Do you mean you want me to add a unit test about the change? I have only verified that this change can solve the problem. #6180
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you mean you want me to add a unit test about the change?

Yeah. We need to add tests to prevent accidental regressions.
Here's a sample:

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.

ForEach Controller Start index for loop not using variable

2 participants