Type annotation on record component doesn't seem to be supported by javac ?

Remi Forax forax at univ-mlv.fr
Wed Oct 9 18:21:12 UTC 2019


At the same time,
it means that String is not equivalent to java.lang.String,
which is, let say not fun to be polite, when you generate Java code.

Rémi

----- Mail original -----
> De: "Alex Buckley" <alex.buckley at oracle.com>
> À: "amber-dev" <amber-dev at openjdk.java.net>
> Envoyé: Mercredi 9 Octobre 2019 20:12:38
> Objet: Re: Type annotation on record component doesn't seem to be supported by javac ?

> 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