On Wed, 17 Apr 2024 08:46:59 GMT, Adam Sotona <asot...@openjdk.org> wrote:
> Current implementation of `LambdaMetafactory` does not allow to use lambdas > in hidden classes. Invocation throws `NoClassDefFoundError` instead. > > This patch includes lambda implementation in a hidden class under the special > handling of `useImplMethodHandle`. > The patch also fixes `j/l/i/defineHiddenClass/BasicTest::testLambda` to > correctly cover this test case. > > Please review. > > Thanks, > Adam Do we also need to check if the parameters or return type are hidden classes? I suppose if we compile a direct bytecode reference to the target method, all of them need to be referenceable from bytecode, not just the holder. ------------- PR Review: https://git.openjdk.org/jdk/pull/18810#pullrequestreview-2005733945