-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
repo-babylon
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.
"
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.
"