when checking whether a method defined in some class A can be accessed through a reference to a subclass of A, compare methods using not only their names but also their argument types (fixes IDEA-92136 External compiler doesn't recompile dependent classes when method moved from class to subclass)

This commit is contained in:
Eugene Zhuravlev
2012-09-26 21:40:13 +02:00
parent 815e80f1e8
commit b338311f83
6 changed files with 43 additions and 23 deletions
@@ -6,3 +6,9 @@ Compiling files:
src/Base.java
src/Impl.java
End of files
Cleaning output files:
out/production/MoveMethodToSubclass/Main.class
End of files
Compiling files:
src/Main.java
End of files
@@ -1,6 +1,6 @@
import java.util.Collection;
public class Base {
public void method(Collection a) {
public void method(Base a) {
}
}
@@ -1,6 +1,6 @@
import java.util.List;
public class Impl extends Base {
public void method(List a) {
public void method(Impl a) {
}
}
@@ -4,7 +4,6 @@ import java.util.Collection;
public class Main {
{
Impl impl = new Impl();
Collection l = new ArrayList();
impl.method(l);
impl.method(null);
}
}