override clone specifics (IDEA-67754)

This commit is contained in:
anna
2013-04-30 18:12:20 +02:00
parent 4e3928010b
commit b421d595a9
5 changed files with 28 additions and 2 deletions
@@ -1,7 +1,19 @@
interface MyCloneable {
//protected method from java.lang.Object is not implicitly declared in interface with no base interfaces
<error descr="'clone()' in 'MyCloneable' clashes with 'clone()' in 'java.lang.Object'; attempting to use incompatible return type">int</error> clone();
int clone();
<error descr="'toString()' in 'MyCloneable' clashes with 'toString()' in 'java.lang.Object'; attempting to use incompatible return type">int</error> toString();
}
interface MyCloneable1 {
<error descr="Method does not override method from its superclass">@Override</error>
Object clone();
}
class MyCloneable2 {
@Override
public Object clone() {
return null;
}
}