mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
18 lines
551 B
Java
18 lines
551 B
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @bug 8187429 8231827
|
|
* @summary Missing unchecked conversion warning
|
|
* @compile/fail/ref=UncheckedWarningOnMatchesTest.out -Xlint:unchecked -Werror -XDrawDiagnostics UncheckedWarningOnMatchesTest.java
|
|
*/
|
|
import java.util.ArrayList;
|
|
|
|
public class UncheckedWarningOnMatchesTest {
|
|
|
|
public static void meth() {
|
|
|
|
Object o = new ArrayList<UncheckedWarningOnMatchesTest>();
|
|
if (o instanceof ArrayList<Integer> ai) { // unchecked conversion
|
|
System.out.println("Blah");
|
|
}
|
|
}
|
|
}
|