RFR: 8322810: Lambda expression types can't be classes [v7]

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Apr 11 15:17:29 UTC 2025


On Fri, 11 Apr 2025 14:51:30 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> we could do that but I would prefer failing asap, as in `makeNotionalInterface` instead of waiting on `Types.findDescriptorInternal` to do the right thing, semantically we will get to the same point, what you are proposing seems to me like another way to get there but honestly I don't see the gain
>
> also what would we do if one of the components is an annotation? technically the intersection is still an interface, we could set then the ANNOTATION flag but it seems like a forced move. Still I agree that, for correctness, we should set the INTERFACE flag at: `makeNotionalInterface` only when applicable

If you want to go with the current code, that's fine by me. It just seemed a bit weird to have the same check in two different places. But we can also clean up in a follow up PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24548#discussion_r2039744219


More information about the compiler-dev mailing list