Skip to content

[JVM] Resolve inherited defaults in special method references - #445

Merged
CaelmBleidd merged 1 commit into
neofrom
caelmbleidd/jvm-inherited-default-special-lookup
Oct 16, 2026
Merged

CaelmBleidd merged 1 commit into
neofrom
caelmbleidd/jvm-inherited-default-special-lookup

Conversation

@CaelmBleidd

Copy link
Copy Markdown
Member

JDK 21 ThreadLocalRandom.nextInt(int, int) cannot build its IR when the invokespecial java.util.Random.nextInt:(II)I reference resolves to a default inherited from RandomGenerator. Special lookup currently misses inherited interface methods; untyped lookup also selects static methods instead of instance methods.

Resolve class declarations first, then maximally specific interface declarations. Typed references reuse the selected declaration while retaining generic substitutions. Constructors remain local to their owner, static methods are excluded, and missing-method diagnostics now include argument types and the JVM descriptor.

Validation:

  • The real JDK graph regression fails with MethodNotFoundException using the unchanged 7db549ef core jar from the Java pilot.
  • All 8 focused regressions pass on JDK 21, including inherited defaults, superclass precedence, abstract redeclarations, generics, constructors, private methods and diagnostics.
  • :jacodb-core:checkLicense and git diff --check pass.
  • The global pre-commit license check fails on four unchanged ETS test headers; bypassed for this commit after the core check passed. No unrelated files changed.

This is a production lookup fix. The experimental Java runner, mode toggle and frozen campaign results are unchanged; Java50 was not rerun.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

  251 files  + 3    251 suites  +3   15m 14s ⏱️ - 1m 28s
  908 tests + 8    896 ✅ + 8  12 💤 ±0  0 ❌ ±0 
2 194 runs  +24  2 142 ✅ +22  52 💤 +2  0 ❌ ±0 

Results for commit c08288e. ± Comparison against base commit 7db549e.

@CaelmBleidd
CaelmBleidd merged commit 4251d20 into neo Oct 16, 2026
8 checks passed
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