[lworld] RFR: 8280382: [lworld] JCWithField AST node support should evolve to work with value classes
Srikanth Adayapalam
sadayapalam at openjdk.java.net
Fri Jan 28 05:02:32 UTC 2022
On Thu, 27 Jan 2022 19:24:47 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?
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties line 3942:
> 3940: compiler.err.primitive.or.value.class.instance.field.expected.here=\
> 3941: withfield operator requires an instance field of a primitive or a value class here
> 3942:
This message is not in alignment with rest of diagnostics that ony speak of value classes. I suggest we amend this to
compiler.err.value.class.instance.field.expected.here. I think it is very visible and open that every primitive class is a value class so it is not necessary to call out primitive or value class
-------------
PR: https://git.openjdk.java.net/valhalla/pull/621
More information about the valhalla-dev
mailing list