jdk-24/test/langtools/tools/javac/generics/InstanceOf3.java

15 lines
347 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
* @ bug
2007-12-01 00:00:00 +00:00
* @summary the type in an instanceof expression must be reifiable
* @author seligman
*
* @compile/fail/ref=InstanceOf3.out -XDrawDiagnostics --release 15 InstanceOf3.java
2007-12-01 00:00:00 +00:00
*/
public class InstanceOf3 {
boolean m() {
return this.getClass() instanceof Class<? extends InstanceOf3>;
}
}