RFR: 8194743: Compiler implementation for Statements before super() [v16]

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Sep 25 17:56:24 UTC 2023


On Mon, 25 Sep 2023 17:47:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Archie Cobbs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Have RefBeforeCtorCalledError extend StaticError and customize debug strings.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties line 238:
> 
>> 236: # 0: name
>> 237: compiler.err.call.must.only.appear.in.ctor=\
>> 238:     calls to {0}() may only appear within constructors
> 
> Note that super()/this() in the JLS lingo is called "explicit constructor invocation".

@GavinBierman do you think the compiler message should mention the official JLS terminology?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13656#discussion_r1336212292


More information about the compiler-dev mailing list