Skip to content

Fixed double not properly resolving as float.#41

Merged
lextatic merged 1 commit into
mainfrom
bugfix/fixed-double-not-resolving-as-float
Jul 19, 2026
Merged

Fixed double not properly resolving as float.#41
lextatic merged 1 commit into
mainfrom
bugfix/fixed-double-not-resolving-as-float

Conversation

@lextatic

Copy link
Copy Markdown
Contributor

Fixed

  • Fixed double inputs not resolving as float.

@lextatic lextatic added the fixed General bug fixes label Jul 19, 2026
@lextatic
lextatic requested a review from Copilot July 19, 2026 14:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes numeric type coercion in the Statescript math property resolvers by ensuring double (and a few other numeric types) can be resolved into float operands where float-based math is expected.

Changes:

  • Extended MathTypeUtils.ResolveAsFloat to correctly handle double, decimal, long, ulong, and uint inputs.
  • Added regression tests asserting several float-returning resolvers accept double operands and still return float results.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Forge/Statescript/Properties/MathTypeUtils.cs Adds missing numeric-type handling so float-based math resolvers can consume double (and other numeric) inputs without failing.
Forge.Tests/Statescript/Resolvers/MathFillResolverTests.cs Adds regression coverage for double operands across several float-returning math fill resolvers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lextatic
lextatic merged commit 1bfca5e into main Jul 19, 2026
2 checks passed
@lextatic
lextatic deleted the bugfix/fixed-double-not-resolving-as-float branch July 19, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixed General bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants