Introduce additional overridability rule

It works only for Java methods and it's purpose is Java overridability rules emulation,
namely distinction of primitive types and their wrappers.

For example `void foo(Integer x)` should not be an override for `void foo(int x)`

 #KT-11440 Fixed
 #KT-11389 Fixed
This commit is contained in:
Denis Zharkov
2016-06-30 13:38:07 +03:00
parent 082c4f971e
commit adff666b0e
14 changed files with 575 additions and 29 deletions
@@ -0,0 +1,22 @@
// FILE: A.java
import org.jetbrains.annotations.*;
public class A {
public void foo(int x) {}
public void bar(@NotNull Double x) {}
}
// FILE: B.java
import org.jetbrains.annotations.*;
public class B extends A {
public void foo(@NotNull Integer x) {}
public void bar(double x) {}
}
// FILE: main.kt
fun foo(b: B) {
// See KT-9182
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(1)
b.<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!>(2.0)
}