Type annotation on record component doesn't seem to be supported by javac ?
Alex Buckley
alex.buckley at oracle.com
Wed Oct 9 18:12:38 UTC 2019
On 10/9/2019 8:30 AM, Vicente Romero wrote:
> Of course the user of the record you wrote would be bugged as he wrote
> the type of the record component was: `String` not `java.lang.String`.
> The record constructor is automatically generated by the compiler, and
> for the generation of its arguments the full qualified type was being
> used. I have fixed this in order to use the same type as written by the
> user. If you update your repo your test case should compile,
By carrying over the terms written in the original source code, you have
smartly and speedily paid off the fee charged by type annotations, where
the (in)ability to annotate terms which syntactically look like type
_uses_ but are actually mere "scoping constructs" (package _names_, type
_names_) was a deliberate JSR 308 policy.
Alex
More information about the amber-dev
mailing list