On Fri, 12 Aug 2022 22:38:49 GMT, Joe Darcy <[email protected]> wrote:

>> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java 
>> line 4023:
>> 
>>> 4021:                         tmpParams.add(F.at(param)
>>> 4022:                                 // we will get flags plus annotations 
>>> from the record component
>>> 4023:                                 .VarDef(F.Modifiers(Flags.PARAMETER | 
>>> Flags.GENERATED_MEMBER | Flags.MANDATED | param.mods.flags & Flags.VARARGS,
>> 
>> Should the use of MANDATED be conditional on the target class file version?
>
> I advise also writing a core reflection test that uses access flags 
> (java.lang.reflect.AccessFlag).

> Should the use of MANDATED be conditional on the target class file version?

I don't think this is needed. The JLS mentions the parameters of canonical 
record constructors in Java 14 already. Previous versions don't have records 
and shouldn't enter that method at all.

> I advise also writing a core reflection test that uses access flags 
> (java.lang.reflect.AccessFlag).

Will do. I assume the `jdk/java/lang/reflect/AccessFlag` folder is a good place 
for that?

-------------

PR: https://git.openjdk.org/jdk/pull/9862

Reply via email to