On Thu, 18 Aug 2022 16:19:31 GMT, Hannes Greule <[email protected]> wrote:
> Thanks, I started working on a test, but the results are somewhat
> inconsistent (no implicit parameter is present for inner class ctors, no
> synthetic parameters for enum ctors, parameter of valueOf is MANDATED,
> implicit parameters in compact record ctor are MANDATED). I'm not sure how we
> want to proceed with that or if there are known issues about that, but it
> might be better to tackle that separately. What do you think?
At least some of that behavior is expected/not surprising given the current
state of javac's implementation. I linked the existing bug related bug
JDK-8250919: Mark compiler-generated elements as mandated
to JDK-8292275 in JBS. When possible, arguably javac should present the "source
view" of a construct, so it would omit, say, the synthetic parameters javac
chooses to add to enum constructors.
I suggest including a test for the mandated structures that "work" and the test
could be expanded as that property is tracked and used more uniformly.
Thanks and HTH
-------------
PR: https://git.openjdk.org/jdk/pull/9862