From f516dd8ab3186121c4a880444302e2f980f393f8 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Wed, 18 Aug 2021 19:36:50 +0200 Subject: [jdk17] Add support for sealed classes --- test/pretty/resource/before/Sealed.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/pretty/resource/before/Sealed.java (limited to 'test/pretty/resource/before/Sealed.java') diff --git a/test/pretty/resource/before/Sealed.java b/test/pretty/resource/before/Sealed.java new file mode 100644 index 00000000..46828627 --- /dev/null +++ b/test/pretty/resource/before/Sealed.java @@ -0,0 +1,17 @@ +// version 15: +public class Sealed { + public abstract sealed class Parent permits Child1, Child2 { + } + + public final class Child1 extends Parent { + } + + public abstract non-sealed class Child2 extends Parent { + } + + public sealed interface SealedInterface permits ChildInterface1 { + } + + public non-sealed interface ChildInterface1 extends SealedInterface { + } +} \ No newline at end of file -- cgit