aboutsummaryrefslogtreecommitdiff
path: root/test/pretty/resource/before/RecordPattern19.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/pretty/resource/before/RecordPattern19.java')
-rw-r--r--test/pretty/resource/before/RecordPattern19.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/pretty/resource/before/RecordPattern19.java b/test/pretty/resource/before/RecordPattern19.java
new file mode 100644
index 00000000..4c417174
--- /dev/null
+++ b/test/pretty/resource/before/RecordPattern19.java
@@ -0,0 +1,16 @@
+// version 19:19
+record Point(int x, int y) {
+}
+record Rectangle(Point upperLeft, Point lowerRight) {
+}
+
+public class RecordPattern19 {
+ void recordPattern(Object o) {
+ if (o instanceof Point(int x, int y)) {
+ }
+ if (o instanceof Point(int x, int y) p) {
+ }
+ if (o instanceof Rectangle(Point(var x1, var y1), Point(int x2, int y2))) {
+ }
+ }
+} \ No newline at end of file