Skip to content

Fix ExprArithmetic's number return types#8456

Merged
sovdeeth merged 2 commits intodev/patchfrom
patch/exprarithmetic-number-return-type
Mar 2, 2026
Merged

Fix ExprArithmetic's number return types#8456
sovdeeth merged 2 commits intodev/patchfrom
patch/exprarithmetic-number-return-type

Conversation

@UnderscoreTud
Copy link
Copy Markdown
Member

Problem

ExprArithmetic wrongly assumes that its return type is a double if one of the operands is not an integer. Which is not true in the case of a variable containing an integer value, causing a mismatch between the claimed return type (a double) and the actual returned value (a long)

Solution

Remove the logic that makes said assumption entirely.

Testing Completed

manual testing, regression test

Supporting Information


Completes: none
Related: none
AI assistance: none

@UnderscoreTud UnderscoreTud requested a review from a team as a code owner February 24, 2026 01:23
@UnderscoreTud UnderscoreTud requested review from Pesekjak and TheMug06 and removed request for a team February 24, 2026 01:23
@UnderscoreTud UnderscoreTud added the bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. label Feb 24, 2026
@sovdeeth sovdeeth added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Mar 2, 2026
@sovdeeth sovdeeth merged commit 31d5ca3 into dev/patch Mar 2, 2026
9 checks passed
@skriptlang-automation skriptlang-automation bot added completed The issue has been fully resolved and the change will be in the next Skript update. and removed patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. labels Mar 2, 2026
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

None yet

Development

Successfully merging this pull request may close these issues.

5 participants