mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
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:
+6
@@ -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
-1
@@ -1,6 +1,6 @@
|
||||
import java.util.Collection;
|
||||
|
||||
public class Base {
|
||||
public void method(Collection a) {
|
||||
public void method(Base a) {
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import java.util.List;
|
||||
|
||||
public class Impl extends Base {
|
||||
public void method(List a) {
|
||||
public void method(Impl a) {
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user