< prev index next >

test/langtools/tools/javac/patterns/LocalVariableTable.java

Print this page
rev 57740 : [mq]: 8237528

@@ -144,11 +144,13 @@
      */
 
     @Expect({ "o", "s" })
     static class Pattern_Simple {
         public static void test(Object o) {
-            if (o instanceof String s) {}
+            if (o instanceof String s) {
+                s.length();
+            }
         }
     }
 
     @Expect({ "s" })
     static class Pattern_Lambda {
< prev index next >