Integrated: 8308642: Unhelpful pattern switch error: illegal fall-through to a pattern
Aggelos Biboudis
abimpoudis at openjdk.org
Fri May 31 08:47:08 UTC 2024
On Thu, 23 May 2024 10:27:46 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:
> Improves two error messages regarding fall-through. Two examples source files after this patch is applied:
>
>
>> javac jdk/test/langtools/tools/javac/diags/examples/FlowsThroughFromPattern.java 1m 35s
> jdk/test/langtools/tools/javac/diags/examples/FlowsThroughFromPattern.java:29: error: illegal fall-through from a pattern
> case String str:
> ^
> the current case label is missing a break
> 1 error
>
>> javac jdk/test/langtools/tools/javac/diags/examples/FlowsThroughToPattern.java
> jdk/test/langtools/tools/javac/diags/examples/FlowsThroughToPattern.java:30: error: illegal fall-through to a pattern
> case Object obj: break;
> ^
> the previous case label is missing a break
> 1 error
This pull request has now been integrated.
Changeset: 778ad00a
Author: Aggelos Biboudis <abimpoudis at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/778ad00af8eafa65604135088ad7d37bf5b8fc39
Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod
8308642: Unhelpful pattern switch error: illegal fall-through to a pattern
Reviewed-by: mcimadamore
-------------
PR: https://git.openjdk.org/jdk/pull/19361
More information about the compiler-dev
mailing list