2019-11-27 08:00:01 +00:00
|
|
|
/*
|
|
|
|
* @test /nodynamiccopyright/
|
|
|
|
* @bug 8187429 8231827
|
|
|
|
* @summary Missing unchecked conversion warning
|
2020-11-05 08:01:33 +00:00
|
|
|
* @compile/fail/ref=UncheckedWarningOnMatchesTest.out -Xlint:unchecked -Werror -XDrawDiagnostics UncheckedWarningOnMatchesTest.java
|
2019-11-27 08:00:01 +00:00
|
|
|
*/
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
public class UncheckedWarningOnMatchesTest {
|
|
|
|
|
2023-01-17 04:43:40 +00:00
|
|
|
public static void meth() {
|
2019-11-27 08:00:01 +00:00
|
|
|
|
|
|
|
Object o = new ArrayList<UncheckedWarningOnMatchesTest>();
|
|
|
|
if (o instanceof ArrayList<Integer> ai) { // unchecked conversion
|
|
|
|
System.out.println("Blah");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|