RFR: 8325859: potential information loss during type inference [v3]

Maurizio Cimadamore mcimadamore at openjdk.org
Thu May 15 15:19:54 UTC 2025


On Thu, 15 May 2025 15:02:34 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> good catch, yes this is a bug in `Infer::shouldPropagate` and one we should fix for sure, but I think that the fundamental problem is still there and will show its head again as soon as, for example, the lambda is not void-compatible

If the target type is non-void, then it will be checked by the `compatible` method I shown above. This is a deferred type check which will cause the inference context to be inferred in full. The problem of this issue is that the final inference step is never executed -- because the target type is `void`.

If you can find a case w/o `void` that exhibits the same issue, we can certainly look into that more.

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

PR Comment: https://git.openjdk.org/jdk/pull/25011#issuecomment-2884210676


More information about the compiler-dev mailing list