On Thu, 25 Jul 2024 00:43:09 GMT, Shaojin Wen <d...@openjdk.org> wrote:

>> The solution is to call `.erase()` on the input method handle, and call 
>> `viewAsType` on the result method handle.
>
> Sorry, I don't understand what you mean. The following code can't solve the 
> above build error
> 
> 
> public static CallSite makeConcatWithConstants() {
> // line 383
>                 return new ConstantCallSite(
>                         SimpleStringBuilderStrategy.generate(lookup, 
> concatType, constantStrings)
>                                 .viewAsType(concatType, true));

Even something like `new Lookup(String.class)` is better for encapsulation.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20273#discussion_r1714233628

Reply via email to