Skip to content

Fix mod_type_inference_1/2 test failures - #190

Open
kindlich wants to merge 3 commits into
fix/ci-jdk-25from
fix/mod-type-inference-1-2-expectations
Open

kindlich wants to merge 3 commits into
fix/ci-jdk-25from
fix/mod-type-inference-1-2-expectations

Conversation

@kindlich

Copy link
Copy Markdown
Member

Summary

  • Test expectations: mod_type_inference_1 and _2 expected NaN for 2.0 / 0, but IEEE 754 gives Infinity (only 0.0 / 0.0 is NaN).
  • Compiler fix: 2.0 / 0 failed with "Ambiguous call", because an unsuffixed int literal was an EXACT match for every integer type it fits into, so nine double / overloads tied. Now only the literal's natural type (int, or long if it doesn't fit) is EXACT; other types are INFERRED. This mirrors the float/double handling from 148a61e.
  • Housekeeping: gradlew marked executable.

Testing

./gradlew test: both mod_type_inference tests pass. The remaining failures are RawTypeInHeaderTest.testRawTypeErrors1/2, which already failed before this change and are unrelated (raw generic type in a Java global's parameter).

🤖 Generated with Claude Code

kindlich and others added 3 commits October 18, 2026 11:46
2.0 / 0 is Infinity under IEEE 754, not NaN (only 0.0 / 0.0 is NaN).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unsuffixed int literals were an EXACT match for every integer type they
fit into, so e.g. 2.0 / 0 matched nine operator overloads equally.
Now only int (or long, if the value doesn't fit) is EXACT; other types
are INFERRED, mirroring the float/double handling from 148a61e.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kindlich
kindlich force-pushed the fix/mod-type-inference-1-2-expectations branch from c641dcd to ca73b27 Compare October 18, 2026 11:46
@kindlich
kindlich changed the base branch from feature/refactor to fix/ci-jdk-25 October 18, 2026 11:46
@kindlich
kindlich marked this pull request as ready for review October 18, 2026 11:54
@kindlich
kindlich added this pull request to stack #192 October 18, 2026 11:54
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.

1 participant