Fix IllegalStateException in case of recursive T & Any upper bound

^KT-50542 Fixed
This commit is contained in:
Denis.Zharkov
2022-01-11 18:20:19 +03:00
committed by teamcity
parent afc548d5d9
commit 964cf937c3
10 changed files with 96 additions and 2 deletions
@@ -0,0 +1,11 @@
// !LANGUAGE: +DefinitelyNonNullableTypes
fun <T : <!INCORRECT_LEFT_COMPONENT_OF_INTERSECTION!>Comparable<T & Any><!>> sort1() {}
fun <T : Comparable<T & Any>?> sort2() {}
class A1<K : Comparable<<!INCORRECT_LEFT_COMPONENT_OF_INTERSECTION!>K<!> & Any>>
class A2<K : Comparable<<!INCORRECT_LEFT_COMPONENT_OF_INTERSECTION!>K<!> & Any>?>
fun <R : T & Any, T> bar() {}
fun <<!CYCLIC_GENERIC_UPPER_BOUND!>E : <!INCORRECT_LEFT_COMPONENT_OF_INTERSECTION!>E & Any<!><!>> baz() {}