1 /*
   2  * @test /nodynamiccopyright/
   3  * @bug 8187429
   4  * @summary Missing unchecked conversion warning
   5  * @compile/fail/ref=UncheckedWarningOnMatchesTest.out -Xlint:unchecked -Werror -XDrawDiagnostics UncheckedWarningOnMatchesTest.java
   6  */
   7 import java.util.ArrayList;
   8 
   9 public class UncheckedWarningOnMatchesTest {
  10 
  11     public static void main(String [] args) {
  12 
  13         Object o = new ArrayList<UncheckedWarningOnMatchesTest>();
  14         if (o instanceof ArrayList<Integer> ai) {  // unchecked conversion
  15             System.out.println("Blah");
  16         }
  17     }
  18 }