The case of Integer.getInteger("1", 2) fixed (was: OVERLOAD_RESOLUTION_AMBIGUITY)

This commit is contained in:
Andrey Breslav
2014-09-09 21:31:59 +04:00
parent 837353d9fd
commit 0b6a4df4f4
3 changed files with 53 additions and 1 deletions
@@ -0,0 +1,29 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: p/J.java
package p;
public class J {
public interface A {}
public static A foo(int s);
public interface B {}
public static B foo(Integer s);
}
// FILE: k.kt
import p.*
import p.J.*
class C
fun foo(i: Int?) : C = null!!
fun test(i: Int, ni: Int?) {
foo(2) : J.A
foo(i) : J.A
J.foo(ni) : J.B
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>(ni)
}