Integrated: 8347530: Improve error message with invalid permits clauses

Aggelos Biboudis abimpoudis at openjdk.org
Wed May 21 06:47:58 UTC 2025


On Thu, 15 May 2025 16:15:56 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

> Currently we report one kind of error message (`subclass {0} must extend sealed class`) when there is a compile-type error in cases like the following:
> 
> 
> sealed class C0 permits S0 {}
> class S0 {}  
> 
> 
> This PR proposes to improve error reporting since there are other kinds of declarations that can also participate in sealed hierarchies like records, enums and interfaces.

This pull request has now been integrated.

Changeset: 50a7755f
Author:    Aggelos Biboudis <abimpoudis at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/50a7755fa45529966373b58652c15975157ab846
Stats:     78 lines in 7 files changed: 73 ins; 0 del; 5 mod

8347530: Improve error message with invalid permits clauses

Reviewed-by: jlahoda

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

PR: https://git.openjdk.org/jdk/pull/25255


More information about the compiler-dev mailing list