Skip to content

Conversation

APickledWalrus
Copy link
Member

Problem

When parsing a statement, if it contained a section expression, and that section expression successfully parsed and claimed a section (but the statement itself failed in init), the claim on the section would not be released. As a result, any future attempts to parse a section expression would fail as it believed the section to already be claimed.

Solution

When a section expression may be parsed, the Statement iterator is wrapped such that the "owner" of the section context is cleared when the next element of the iterator is returned.

Testing Completed

tested in game using a combination of addons that exposed the issue. testing is a bit complex as it would require usage of priorities which isn't currently possible with test syntax. if it is really wanted i can probably make it happen

Supporting Information


Completes: none
Related: none

@APickledWalrus APickledWalrus requested review from a team as code owners July 25, 2025 02:40
@APickledWalrus APickledWalrus added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Jul 25, 2025
@APickledWalrus APickledWalrus requested review from UnderscoreTud and erenkarakal and removed request for a team July 25, 2025 02:40
@APickledWalrus APickledWalrus moved this to In Review in 2.12 Releases Jul 25, 2025
@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.12 Releases Jul 25, 2025
@skriptlang-automation skriptlang-automation bot added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Jul 25, 2025
@APickledWalrus APickledWalrus merged commit ce32116 into SkriptLang:dev/patch Jul 25, 2025
5 checks passed
@skriptlang-automation skriptlang-automation bot added the completed The issue has been fully resolved and the change will be in the next Skript update. label Jul 25, 2025
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done - Awaiting Release in 2.12 Releases Jul 25, 2025
@skriptlang-automation skriptlang-automation bot removed the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Jul 25, 2025
@APickledWalrus APickledWalrus deleted the patch/section-expression-claiming branch July 25, 2025 17:35
@sovdeeth sovdeeth moved this from Done - Awaiting Release to Done - Released in 2.12 Releases Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update.
Projects
Status: Done - Released
Development

Successfully merging this pull request may close these issues.

4 participants