[FE] Implement discussed rules to report empty intersection errors

This commit is contained in:
Victor Petukhov
2022-03-28 16:11:18 +03:00
committed by teamcity
parent b96708c3e2
commit 5bfe6cd20a
29 changed files with 241 additions and 62 deletions
@@ -1,14 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
abstract class Bar<T>
class Foo<T> : Bar<T>(), Comparable<Foo<*>> {
override fun compareTo(other: Foo<*>): Int = TODO()
}
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.<!OVERLOAD_RESOLUTION_AMBIGUITY!>test<!>(exp2)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
abstract class Bar<T>