FIR: rename AMBIGUITY to OVERLOAD_RESOLUTION_AMBIGUITY to match FE 1.0

This commit is contained in:
Mikhail Glukhikh
2021-04-02 11:51:36 +03:00
parent 71397a06fb
commit f0ff9ad5a7
168 changed files with 504 additions and 1197 deletions
@@ -1,30 +0,0 @@
// FILE: a.kt
package a
class A
// FILE: b.kt
package b
import a.A
val A.d: Int get() = 1
// FILE: c.kt
package c
import a.A
val A.d: Int get() = 2
// FILE: d.kt
package d
import a.A
import b.d
import c.d
fun A.test() {
<!AMBIGUITY!>d<!>
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FILE: a.kt
package a
@@ -1,11 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(a: Any, f: ()->Int) = f()
fun foo(a: Any, f: (Any)->Int) = f(a)
fun foo(i: Int, f: Int.()->Int) = i.f()
fun test1() {
<!AMBIGUITY!>foo<!>(1) { ->
<!NO_THIS!>this<!>
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(a: Any, f: ()->Int) = f()
@@ -5,7 +5,7 @@ fun Int.invoke(i: Int, a: Any) {}
fun Int.invoke(a: Any, i: Int) {}
fun foo(i: Int) {
<!AMBIGUITY!>i<!>(1, 1)
<!OVERLOAD_RESOLUTION_AMBIGUITY!>i<!>(1, 1)
<!AMBIGUITY!>5<!>(1, 2)
<!OVERLOAD_RESOLUTION_AMBIGUITY!>5<!>(1, 2)
}
@@ -13,8 +13,8 @@ fun <E> baz(x: E, y: String) {}
fun <E> baz(x: String, y: E) {}
fun bar(x: A<String>) {
x.<!AMBIGUITY!>foo<!>("")
x.<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>("")
x.<!AMBIGUITY!>baz<!>("", "")
<!AMBIGUITY!>baz<!>("", "")
x.<!OVERLOAD_RESOLUTION_AMBIGUITY!>baz<!>("", "")
<!OVERLOAD_RESOLUTION_AMBIGUITY!>baz<!>("", "")
}
@@ -12,5 +12,5 @@ fun <T> B<T>.foo(block: (T) -> Unit) {
}
fun main() {
B("string").<!AMBIGUITY!>foo<!> { }
B("string").<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!> { }
}
@@ -12,5 +12,5 @@ fun <T> B<T>.foo(block: (T) -> Unit) {
}
fun main() {
B("string").<!AMBIGUITY!>foo<!> { }
B("string").<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!> { }
}
@@ -22,5 +22,5 @@ import a.*
import b.*
fun test() {
<!AMBIGUITY!>foo<!><A> { }
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!><A> { }
}
@@ -22,5 +22,5 @@ import a.*
import b.*
fun test() {
<!AMBIGUITY!>foo<!><A> { }
<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!><A> { }
}
@@ -10,5 +10,5 @@ infix fun <T : Comparable<T>, S : T?> Bar<in S>.test(t: T) { }
infix fun <T : Comparable<T>, S : T?> Bar<in S>.test(other: Bar<in S>) {}
fun checkFunctions(exp1: Foo<Int?>, exp2: Foo<Int>) {
exp1.<!AMBIGUITY!>test<!>(exp2)
exp1.<!OVERLOAD_RESOLUTION_AMBIGUITY!>test<!>(exp2)
}
@@ -7,4 +7,4 @@ class A<T>
fun <T1> A<T1>.foo() = X1
fun <T2> A<out T2>.foo() = X2
fun <T> A<out T>.test() = <!AMBIGUITY!>foo<!>() // TODO fix constraint system
fun <T> A<out T>.test() = <!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>() // TODO fix constraint system