Skip to content

Fix plain Jass modulo semantics - #1209

Merged
Frotty merged 1 commit into
masterfrom
fix-jass-modulo-operator
Jul 31, 2026
Merged

Fix plain Jass modulo semantics#1209
Frotty merged 1 commit into
masterfrom
fix-jass-modulo-operator

Conversation

@Frotty

@Frotty Frotty commented Jul 31, 2026

Copy link
Copy Markdown
Member

Fixes #800.

Plain Jass % was parsed as Wurst real modulo. This change treats it as integer-only truncating remainder, preserves % in Jass output, and lowers it to math.fmod for Lua. Wurst mod remains unchanged.

Tests cover Jass/Lua semantics, emitted output, and rejection of real operands. The full Gradle suite passes.

@Frotty
Frotty marked this pull request as ready for review July 31, 2026 11:08
@Frotty
Frotty merged commit 244b1d5 into master Jul 31, 2026
6 checks passed
@Frotty
Frotty deleted the fix-jass-modulo-operator branch July 31, 2026 14:31
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.

Incorrect modulo behavior in plain Jass

1 participant