diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2022-08-26 00:53:47 +0200 |
---|---|---|
committer | Rawi01 <Rawi01@users.noreply.github.com> | 2022-08-26 00:53:47 +0200 |
commit | 479bd2d75d2046ee1cb337ef6aa929b707868345 (patch) | |
tree | 92c724e360c444d01e5c34dc14add29f54d25fe9 /test/pretty/resource/before | |
parent | 957adfae2ece1fe8a469976143ae7c8db8e67686 (diff) | |
download | lombok-479bd2d75d2046ee1cb337ef6aa929b707868345.tar.gz lombok-479bd2d75d2046ee1cb337ef6aa929b707868345.tar.bz2 lombok-479bd2d75d2046ee1cb337ef6aa929b707868345.zip |
[jdk19] Add support for record pattern
Diffstat (limited to 'test/pretty/resource/before')
-rw-r--r-- | test/pretty/resource/before/RecordPattern.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/pretty/resource/before/RecordPattern.java b/test/pretty/resource/before/RecordPattern.java new file mode 100644 index 00000000..93c07965 --- /dev/null +++ b/test/pretty/resource/before/RecordPattern.java @@ -0,0 +1,16 @@ +// version 19: +record Point(int x, int y) { +} +record Rectangle(Point upperLeft, Point lowerRight) { +} + +public class RecordPattern { + 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(int x1, int y1), Point(int x2, int y2))) { + } + } +}
\ No newline at end of file |