aboutsummaryrefslogtreecommitdiff
path: root/test/pretty/resource/after/RecordPattern19.java
blob: 68b392663cb1ca1a3f051a361185e0d8c98db918 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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))) {
		}
	}
}