[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:41:40 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?
I have indicated problem spots. Please incorporate the changes and update, Thanks!
test/langtools/tools/javac/valhalla/value-objects/FlattenableNegativeTest.java line 38:
> 36: }
> 37: }
> 38: }
For value classes, this is not a negative test. The test should compile fine.
test/langtools/tools/javac/valhalla/value-objects/FlattenableNegativeTest.out line 10:
> 8: FlattenableNegativeTest.java:33:25: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.null, FlattenableNegativeTest.V)
> 9: FlattenableNegativeTest.java:34:32: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: compiler.misc.type.null, FlattenableNegativeTest.V)
> 10: 9 errors
None of these errors should be emitted, null is assignable to B2 instances.
-------------
Changes requested by sadayapalam (Committer).
PR: https://git.openjdk.java.net/valhalla/pull/621
More information about the valhalla-dev
mailing list