2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2015-05-15 16:53:42 -07:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 4471667
|
|
|
|
* @summary compiler allows overriding with different primitive return type
|
|
|
|
* @author gafter
|
|
|
|
*
|
2015-05-15 16:53:42 -07:00
|
|
|
* @compile/fail/ref=PrimitiveVariant.out -XDrawDiagnostics PrimitiveVariant.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
2010-03-02 16:43:29 -08:00
|
|
|
package PrimitiveVariant;
|
2007-12-01 00:00:00 +00:00
|
|
|
|
|
|
|
interface I {
|
|
|
|
double m();
|
|
|
|
}
|
|
|
|
|
|
|
|
abstract class J {
|
|
|
|
int m() { return 2; }
|
|
|
|
}
|
|
|
|
|
|
|
|
class Main extends J implements I {
|
|
|
|
public short m() { return 1; }
|
|
|
|
}
|