On Thu, 2 Nov 2023 12:24:31 GMT, Jim Laskey <jlas...@openjdk.org> wrote:
>> Uhmm. In the spec I see implicit classes named here: >> >> >> For reference, the following constructs are declared implicitly in source >> code, but are not marked as mandated because only formal parameters and >> modules can be so marked in a class file (JVMS §4.7.24, JVMS §4.7.25): >> ``` >> >> Note the `but are not marked as mandated`. >> >> I don't think javac sets the mandated flag for any of these. Note that >> ACC_MANDATED has the same value as the ACC_MODULE flag, so setting that flag >> on a class w/o at least filtering out when writing the classfile will be >> problematic. > > Hmmm. I'll check with Gavin, but I thought in discussions Alex said that it > should be mandated. At any rate, seems the ACC_MANDATED should be removed for > stated reasons. It should be MANDATED in theory given it's not an artifact of the compilation like SYNTHETIC is. Sadly, as Maurizio said ACC_MANDATED has the same value as ACC_MODULE. I think there is a value to still make it as SYNTHETIC, apart if we add a new specific attribute for implicit classes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16461#discussion_r1380604311