[lworld] Integrated: 8370635: [lworld] TypeName.super.[TypeArguments] Identifier cannot occur in prologue

Vicente Romero vromero at openjdk.org
Mon Dec 15 19:35:39 UTC 2025


On Tue, 9 Dec 2025 02:38:06 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> Code like:
> 
> class Test {
>     static boolean testMethod() { return true; }
>     Test() {}
>     Test(int a) {
>         Test.this.testMethod();
>         this();
>     }
> }
> 
> 
> or:
> 
> 
> class Super {
>     static <T> void m() {}
> }
> 
> class Test extends Super {
>     Test() {
>         Test.super.<String>m();
>         super();
>     }
> }
> 
> 
> shouldn't be allowed in prologue. Javac was not checking static method invocations in the prologue correctly. This fix should solve this issue,
> 
> TIA

This pull request has now been integrated.

Changeset: c03121d9
Author:    Vicente Romero <vromero at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/c03121d9891be4bfef3d5b7d739168e31e4dbb47
Stats:     31 lines in 4 files changed: 27 ins; 0 del; 4 mod

8370635: [lworld] TypeName.super.[TypeArguments] Identifier cannot occur in prologue

Reviewed-by: liach

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

PR: https://git.openjdk.org/valhalla/pull/1779


More information about the valhalla-dev mailing list