adff666b0e
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
23 lines
458 B
Kotlin
Vendored
23 lines
458 B
Kotlin
Vendored
// 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)
|
|
}
|