aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/pretty/resource/after/PatternInstanceOf.java7
-rw-r--r--test/pretty/resource/before/PatternInstanceOf.java8
2 files changed, 15 insertions, 0 deletions
diff --git a/test/pretty/resource/after/PatternInstanceOf.java b/test/pretty/resource/after/PatternInstanceOf.java
new file mode 100644
index 00000000..3fcba749
--- /dev/null
+++ b/test/pretty/resource/after/PatternInstanceOf.java
@@ -0,0 +1,7 @@
+public class PatternInstanceOf {
+ public void foo(Object o) {
+ if (o instanceof String y) {
+ System.out.println(y);
+ }
+ }
+}
diff --git a/test/pretty/resource/before/PatternInstanceOf.java b/test/pretty/resource/before/PatternInstanceOf.java
new file mode 100644
index 00000000..c957adeb
--- /dev/null
+++ b/test/pretty/resource/before/PatternInstanceOf.java
@@ -0,0 +1,8 @@
+// version 14:
+public class PatternInstanceOf {
+ public void foo(Object o) {
+ if (o instanceof String y) {
+ System.out.println(y);
+ }
+ }
+}