Skip to content

Improve ExpressionList#acceptChange, implement #changeInPlace#8211

Merged
sovdeeth merged 4 commits intoSkriptLang:dev/patchfrom
sovdeeth:patch/ExprList-acceptChange-CIP
Oct 1, 2025
Merged

Improve ExpressionList#acceptChange, implement #changeInPlace#8211
sovdeeth merged 4 commits intoSkriptLang:dev/patchfrom
sovdeeth:patch/ExprList-acceptChange-CIP

Conversation

@sovdeeth
Copy link
Copy Markdown
Member

Problem

ExpressionList didn't accurately return the right acceptChange classes, it was too conservative. Subexpressions needed to accept the same Class, rather than checking for subclasses and returning the lowest common denominator.

Solution

Each subexpression is checked to see which of its acceptChange values are compatible with the previously determined values. When a match is found, the more specific type is taken, to avoid issues with a superclass being returned, but the exprs only accepting a specific subclass.

Testing Completed

Supporting Information


Completes: none
Related: none

@sovdeeth sovdeeth requested review from a team as code owners September 29, 2025 02:39
@sovdeeth sovdeeth removed the request for review from a team September 29, 2025 02:39
@sovdeeth sovdeeth added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Sep 29, 2025
@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Sep 29, 2025
@sovdeeth sovdeeth requested review from erenkarakal and removed request for a team September 29, 2025 02:39
@skriptlang-automation skriptlang-automation bot added the needs reviews A PR that needs additional reviews label Sep 29, 2025
@github-project-automation github-project-automation bot moved this to In Review in 2.13 Releases Sep 29, 2025
sovdeeth and others added 2 commits September 28, 2025 20:26
Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from In Review to Awaiting Merge in 2.13 Releases Sep 30, 2025
@skriptlang-automation skriptlang-automation bot added patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. and removed needs reviews A PR that needs additional reviews labels Oct 1, 2025
@sovdeeth sovdeeth merged commit 7d0d6f9 into SkriptLang:dev/patch Oct 1, 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 Oct 1, 2025
@github-project-automation github-project-automation bot moved this from Awaiting Merge to Done - Awaiting Release in 2.13 Releases Oct 1, 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 Oct 1, 2025
@sovdeeth sovdeeth moved this from Done - Awaiting Release to Done - Released in 2.13 Releases Oct 15, 2025
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
…Lang#8211)

* Rework ExpressionList#acceptChange() and #changeInPlace()

* Update src/main/java/ch/njol/skript/lang/ExpressionList.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>

* remove unnecessary code that removes supertypes
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
…Lang#8211)

* Rework ExpressionList#acceptChange() and #changeInPlace()

* Update src/main/java/ch/njol/skript/lang/ExpressionList.java

Co-authored-by: SirSmurfy2 <82696841+Absolutionism@users.noreply.github.com>

* remove unnecessary code that removes supertypes
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. enhancement Feature request, an issue about something that could be improved, or a PR improving something.

Projects

No open projects
Status: Done - Released

Development

Successfully merging this pull request may close these issues.

3 participants