aboutsummaryrefslogtreecommitdiff
path: root/test/pretty/resource/after/PatternInstanceOf.java
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-29 03:07:21 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-01-29 03:07:21 +0100
commit229cde2bf084e243913030ddad4bce13f6c38732 (patch)
tree2a211dfec7a570f50ff83971b323bf3a933f3db3 /test/pretty/resource/after/PatternInstanceOf.java
parente95680a76733c22ee5937a586ee50c703d5ba621 (diff)
downloadlombok-229cde2bf084e243913030ddad4bce13f6c38732.tar.gz
lombok-229cde2bf084e243913030ddad4bce13f6c38732.tar.bz2
lombok-229cde2bf084e243913030ddad4bce13f6c38732.zip
[Fixes #2349] Support for JDK 14
Added the ability to parse and pretty-print the new 'x instanceof String y' pattern concept. Added a test to the pretty printer to confirm that it works.
Diffstat (limited to 'test/pretty/resource/after/PatternInstanceOf.java')
-rw-r--r--test/pretty/resource/after/PatternInstanceOf.java7
1 files changed, 7 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);
+ }
+ }
+}