Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8337050

Callsite lookup of quotable lambda

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • repo-babylon
    • core-libs

      From Tagir:

      https://mail.openjdk.org/pipermail/babylon-dev/2024-July/001096.html

      "
      4. It's probably expected but I cannot call private methods and access private fields at the Quotable lambda callsite. For this, I need a callsite Lookup object. It would be inconvenient to pass a lookup object every time together with lambda. Would it be possible to have some kind of BlessedQuotable extends Quotable, which aside from quoted(), also provides a callsite lookup? I think if we call a method that accepts a quotable lambda, we already trust that method quite much. It looks not very useful if that method can detect that we refer to a private field from the lambda, but it cannot read that private field. Sorry if I'm missing something.
      "

            Unassigned Unassigned
            psandoz Paul Sandoz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: