Integrated: 8314165: [lw5] check for illegal circularity at class loading time

Vicente Romero vromero at openjdk.org
Fri Aug 11 22:54:58 UTC 2023


On Fri, 11 Aug 2023 22:07:29 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> This PR is implementing this assertion of JEP 401:
> 
> 
> At class load time, an error occurs if an ACC_DEFAULT class has an illegal circularity in its instance field types
> 
> 
> which is in section: `class file representation & interpretation`
> 
> So for example if a Java compiler were able to create a class file for class:
> 
> value class Test {
>     Test! test; // illegal circularity
>     public implicit Test();
> }
> 
> then javac should issue an error while loading such a class

This pull request has now been integrated.

Changeset: ad095102
Author:    Vicente Romero <vromero at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/ad0951021553c5df042c4ffdea710fb8c9f82643
Stats:     157 lines in 6 files changed: 150 ins; 0 del; 7 mod

8314165: [lw5] check for illegal circularity at class loading time

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

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



More information about the valhalla-dev mailing list