[code-reflection] RFR: Replace opField with opMethod for lambdas.

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Jan 6 13:55:04 UTC 2025


On Wed, 25 Dec 2024 10:25:29 GMT, Mourad Abbay <mabbay at openjdk.org> wrote:

> We replace field holding the textual representation of an identified lambda with method that returns the representation of that lambda.

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java line 882:

> 880:             }
> 881:             if (isQuotable) {
> 882:                 MethodSymbol opMethodSym = (MethodSymbol)tree.codeModel;

Since  now all code models are stored as `MethodSymbol`, I wonder if we could maybe sharpen the type in `JCLambda` to use `MethodSymbol` instead of `Symbol`.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/301#discussion_r1904177083


More information about the babylon-dev mailing list