fix: dual-mode test coverage and Long/Float literal compilation#543
Merged
lukaszlenart merged 2 commits intomainfrom Feb 21, 2026
Merged
fix: dual-mode test coverage and Long/Float literal compilation#543lukaszlenart merged 2 commits intomainfrom
lukaszlenart merged 2 commits intomainfrom
Conversation
ASTConst.toGetSourceString() was generating "1234" for Long values and "12.34" for Float values. Java interprets these as int and double respectively, causing type mismatches between interpreted and compiled evaluation modes. Append "L" and "f" suffixes to preserve the correct types. Refs: #18 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add 66 tests validating that interpreted and compiled execution paths produce identical results. Covers constants, integer/double/float arithmetic, bitwise ops, logical expressions, property access, method calls, and null handling. 11 tests are @disabled documenting known compiler limitations: - BigDecimal/BigInteger arithmetic (Java operators unsupported) - BigInteger bitwise operations - Float-to-double widening in arithmetic - instanceof expression compilation - Method calls on auto-boxed primitives Refs: #18 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
ASTConst.toGetSourceString()to appendLsuffix for Long literals andfsuffix for Float literals in compiled source code generation@DisabledtestsDetails
The expression compiler generates Java source code via javassist.
ASTConstwas emitting1234for Long values (interpreted asint) and12.34for Float values (interpreted asdouble), causing type mismatches between interpreted and compiled modes.Tests cover
Known compiler limitations (documented by @disabled tests)
+,-,*,/) cannot be applied to these objects in generated source — requires architectural change to route throughOgnlOpsmethodsindex.toString()generates invalid castRelated
Once merged, #504 and #505 should be closed.
Test plan
🤖 Generated with Claude Code