fix: restore scope and export expression code generation - #1436
Merged
joaodinissf merged 3 commits intoAug 26, 2026
Merged
Conversation
joaodinissf
force-pushed
the
followup/scope-expression-codegen-test
branch
2 times, most recently
from
August 25, 2026 17:15
e6d93db to
bc585e0
Compare
rubenporras
previously approved these changes
Aug 26, 2026
Recognize nested arithmetic calls recursively as numeric expressions. Without this, an outer arithmetic call can fall through to method-call rendering and produce invalid Java such as *(4 + 2, 3). Leave == and != untranslated because Xbase equality is value-based while the legacy Java generator emits identity equality. Current production generation already uses the string compiler for these expressions, so this is a defensive translator-contract correction rather than a live equality regression. Apply both changes symmetrically to the duplicated Scope and Export expression pipelines.
joaodinissf
force-pushed
the
followup/scope-expression-codegen-test
branch
from
August 26, 2026 09:59
bc585e0 to
d5b4c0d
Compare
rubenporras
previously approved these changes
Aug 26, 2026
Add focused generator tests for recursive arithmetic, arithmetic/string-concatenation controls, and the unsupported equality translator contract in both duplicated DSL pipelines. Register them in the existing aggregate test suite.
Both bundles change production code relative to their 17.3.2 baselines.
joaodinissf
force-pushed
the
followup/scope-expression-codegen-test
branch
from
August 26, 2026 11:32
1769686 to
7154a31
Compare
joaodinissf
marked this pull request as ready for review
August 26, 2026 11:59
rubenporras
approved these changes
Aug 26, 2026
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
Restores and tests two expression-generation behaviours in the scope and export DSL pipelines.
Nested arithmetic
isNumber()previously relied onresolveType(). That returnsnullfor an arithmeticOperationCall, so an outer operation could misclassify a nested arithmetic expression and render it as a method call:The compilers now recognize nested arithmetic operations recursively, producing valid Java such as:
This was a real latent generation bug: existing repository models did not exercise nested arithmetic, so the malformed output had escaped CI.
Equality translation
The Xbase translator mappings for
==and!=implement value equality, while the scope and export string compilers intentionally emit Java identity equality.The translators now leave these operators unsupported so generation falls back to the existing string compilers. Current production generation already uses that fallback for these expressions, so this is a defensive translator-contract correction rather than evidence of a live equality regression.
Both changes are applied symmetrically to scope and export.
Tests
Adds a shared expression-generation test harness with concrete scope and export test classes, registered in the existing aggregate test suite.
The tests cover:
Before the fix, nested arithmetic failed in both compiler implementations and the equality translators violated the fallback contract. All six inherited tests pass after the fix.
Versioning
Bumps the scope and export bundles from
17.3.2to17.3.3because both contain production-code changes.Validation