FIR: rename AMBIGUITY to OVERLOAD_RESOLUTION_AMBIGUITY to match FE 1.0
This commit is contained in:
Vendored
-36
@@ -1,36 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
public int foo(Runnable r) { return 0; }
|
||||
public String foo(Object r) { return null;}
|
||||
|
||||
public int bar(Runnable r) { return 1; }
|
||||
public String bar(CharSequence r) { return null; }
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
fun fn() {}
|
||||
fun x(a: A, r: Runnable) {
|
||||
a.foo(::fn) checkType { _<Int>() }
|
||||
a.foo {} checkType { _<Int>() }
|
||||
|
||||
a.foo(null) checkType { _<Int>() }
|
||||
a.foo(Runnable { }) checkType { _<Int>() }
|
||||
a.foo(r) checkType { _<Int>() }
|
||||
|
||||
a.foo(123) checkType { _<String>() }
|
||||
a.foo("") checkType { _<String>() }
|
||||
|
||||
a.bar(::fn) checkType { _<Int>() }
|
||||
a.bar {} checkType { _<Int>() }
|
||||
|
||||
a.bar(r) checkType { _<Int>() }
|
||||
|
||||
a.<!AMBIGUITY!>bar<!>(null)
|
||||
|
||||
a.bar(null as Runnable?) checkType { _<Int>() }
|
||||
a.bar(null as CharSequence?) checkType { _<String>() }
|
||||
|
||||
a.bar("") checkType { _<String>() }
|
||||
a.<!NONE_APPLICABLE!>bar<!>(123)
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
|
||||
Vendored
-36
@@ -1,36 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
public static int foo(Runnable r) { return 0; }
|
||||
public static String foo(Object r) { return null;}
|
||||
|
||||
public static int bar(Runnable r) { return 1; }
|
||||
public static String bar(CharSequence r) { return null; }
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
fun fn() {}
|
||||
fun x(r: Runnable) {
|
||||
A.foo(::fn) checkType { _<Int>() }
|
||||
A.foo {} checkType { _<Int>() }
|
||||
|
||||
A.foo(null) checkType { _<Int>() }
|
||||
A.foo(Runnable { }) checkType { _<Int>() }
|
||||
A.foo(r) checkType { _<Int>() }
|
||||
|
||||
A.foo(123) checkType { _<String>() }
|
||||
A.foo("") checkType { _<String>() }
|
||||
|
||||
A.bar(::fn) checkType { _<Int>() }
|
||||
A.bar {} checkType { _<Int>() }
|
||||
|
||||
A.bar(r) checkType { _<Int>() }
|
||||
|
||||
A.<!AMBIGUITY!>bar<!>(null)
|
||||
|
||||
A.bar(null as Runnable?) checkType { _<Int>() }
|
||||
A.bar(null as CharSequence?) checkType { _<String>() }
|
||||
|
||||
A.bar("") checkType { _<String>() }
|
||||
A.<!NONE_APPLICABLE!>bar<!>(123)
|
||||
}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ fun x(r: Runnable) {
|
||||
|
||||
A.bar(r) checkType { _<Int>() }
|
||||
|
||||
A.<!AMBIGUITY!>bar<!>(null)
|
||||
A.<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!>(null)
|
||||
|
||||
A.bar(null as Runnable?) checkType { _<Int>() }
|
||||
A.bar(null as CharSequence?) checkType { _<String>() }
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ fun x(a: A, r: Runnable) {
|
||||
|
||||
a.bar(r) checkType { _<Int>() }
|
||||
|
||||
a.<!AMBIGUITY!>bar<!>(null)
|
||||
a.<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!>(null)
|
||||
|
||||
a.bar(null as Runnable?) checkType { _<Int>() }
|
||||
a.bar(null as CharSequence?) checkType { _<String>() }
|
||||
|
||||
Reference in New Issue
Block a user