<i18n dev> RFR: JDK-8315457 Implementation of String Templates (Second Preview) [v2]
Jim Laskey
jlaskey at openjdk.org
Tue Oct 17 16:03:28 UTC 2023
On Mon, 16 Oct 2023 16:51:14 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java line 1691:
>>
>>> 1689: }
>>> 1690:
>>> 1691: private Type getProcessMethodType(JCStringTemplate tree, Type processorType) {
>>
>> This method is basically the same as in `Attr`, correct? I wonder if there's a way to avoid the duplication? One possibility would be to compute the type in `Attr`, and store it in a field on `JCStringTemplate`, and just use it in `Flow`. Alternatively, it could be shared in some class, although only `TreeInfo` and `Resolve` come to mind, and neither seem particularly suitable for that.
>
> I thought of the TreeInfo and Resolve idea but the number of arguments required made it messy. Hanging off of JCStringTemplate seemed like clutter to me. If I could use the method symbol in TransLiterals it might make sense. I'll ponder on it.
Added
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16202#discussion_r1362377976
More information about the i18n-dev
mailing list