2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-05-16 00:43:21 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 4965756
|
|
|
|
* @summary no covariant returns involving primitives
|
|
|
|
* @author gafter
|
|
|
|
*
|
2015-05-16 00:43:21 +00:00
|
|
|
* @compile/fail/ref=Covar4.out -XDrawDiagnostics Covar4.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
public class Covar4 {
|
|
|
|
static class A1 {
|
|
|
|
public long f() { return 12L; }
|
|
|
|
}
|
|
|
|
static class B1 extends A1 {
|
|
|
|
public int f() { return 12; }
|
|
|
|
}
|
|
|
|
}
|