[lworld] RFR: 8280382: [lworld] JCWithField AST node support should evolve to work with value classes [v2]
Srikanth Adayapalam
sadayapalam at openjdk.java.net
Fri Jan 28 13:51:39 UTC 2022
On Fri, 28 Jan 2022 13:16:42 GMT, Aggelos Biboudis <duke at openjdk.java.net> wrote:
>> This PR ports basic `withField` tests from lworld-values to value-objects and extending some areas of code to support `withField` within value classes.
>>
>> Nitpicking and a note: one of the error messages is now `compiler.err.primitive.or.value.class.instance.field.expected.here`. Would you propose to disambiguate further depending whether we are inside a `primitive` or a `value` class?
>
> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
>
> Address review
One change is requested, otherwise looks good. Please make this change and once the tests are known to be green, proceed to integrate, Thanks!
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 1335:
> 1333: if (tree.init != null) {
> 1334: if ((v.flags_field & FINAL) == 0 || ((v.flags_field & STATIC) == 0 && (v.owner.isPrimitiveClass() || v.owner.isValueClass())) ||
> 1335: !memberEnter.needsLazyConstValue(tree.init)) {
There is still one instanceof isPrimitiveClass() || isValueClass() left in
-------------
Marked as reviewed by sadayapalam (Committer).
PR: https://git.openjdk.java.net/valhalla/pull/621
More information about the valhalla-dev
mailing list