RFR: [Type-classes] Fix issue with type class op resolution inside speculative attribution

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Jan 27 11:56:14 UTC 2026


During speculative attribution of lambda expressions, we might get to the unary/binary op resolution code with erroneous types.
When this happens, type class witness resolution fails if Numerical/Integral are tweaked to contain witness methods.

This PR fixes this condition and adds a test.

-------------

Commit messages:
 - Fix issue with type class op resolution inside speculative attribution

Changes: https://git.openjdk.org/valhalla/pull/1981/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1981&range=00
  Stats: 141 lines in 5 files changed: 136 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/valhalla/pull/1981.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1981/head:pull/1981

PR: https://git.openjdk.org/valhalla/pull/1981


More information about the valhalla-dev mailing list