[FIR] UPPER_BOUND_VIOLATED optimizations

This commit is contained in:
Nick
2020-07-13 10:11:58 +03:00
committed by Mikhail Glukhikh
parent 41a0cfe002
commit 1ea5678932
3 changed files with 85 additions and 31 deletions
@@ -13,6 +13,9 @@ fun <T : A> fest() {
fun test() {
val b1 = B<<!UPPER_BOUND_VIOLATED!>Int<!>>()
val b2 = B<C>()
val b3 = B<<!UPPER_BOUND_VIOLATED!>Any?<!>>()
val b4 = B<UnexistingType>()
val b5 = B<<!UPPER_BOUND_VIOLATED!>B<UnexistingType><!>>()
fest<<!UPPER_BOUND_VIOLATED!>Boolean<!>>()
fest<C>()
fest<HHH>()
@@ -38,4 +41,8 @@ fun <K, L : K> rest() {
class NumColl<T : Collection<Number>>
typealias NL<K> = NumColl<List<K>>
val test7 = NL<Int>()
val test8 = <!UPPER_BOUND_VIOLATED!>NL<String>()<!>
val test8 = <!UPPER_BOUND_VIOLATED!>NL<String>()<!>
class NumberPhile<T: Number>(x: T)
val np1 = NumberPhile(10)
val np2 = <!INAPPLICABLE_CANDIDATE!>NumberPhile<!>("Test")