Add test for obsolete issue

The problem was fixed in d51bb2c053

 #KT-37692 Obsolete
This commit is contained in:
Mikhail Zarechenskiy
2020-07-08 15:30:15 +03:00
parent 78a4563baf
commit 2bb9838a80
6 changed files with 63 additions and 0 deletions
@@ -0,0 +1,14 @@
// !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.test(exp2)
}