Add a test with false positive "inferred into empty intersection"

Related to KT-50232
This commit is contained in:
Mikhail Glukhikh
2022-08-12 16:09:50 +02:00
committed by Space
parent d3eedd791e
commit a6b90fcb8e
7 changed files with 65 additions and 0 deletions
@@ -0,0 +1,11 @@
fun test() {
acceptMyRecursive(<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_WARNING!>inferType<!><<!UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED, UPPER_BOUND_VIOLATED!>MyRecursive?<!>>())
}
fun acceptMyRecursive(value: MyRecursive?) {}
fun <R : Recursive<R>?> inferType(): R = TODO()
abstract class Recursive<R>
class MyRecursive : Recursive<MyRecursive>()