FIR: Temporary adjust diagnostics test data
UPPER_BOUND_VIOLATED for type alias constructors is not supported properly See KT-43142
This commit is contained in:
+1
-1
@@ -41,7 +41,7 @@ fun <K, L : K> rest() {
|
|||||||
class NumColl<T : Collection<Number>>
|
class NumColl<T : Collection<Number>>
|
||||||
typealias NL<K> = NumColl<List<K>>
|
typealias NL<K> = NumColl<List<K>>
|
||||||
val test7 = NL<Int>()
|
val test7 = NL<Int>()
|
||||||
val test8 = <!UPPER_BOUND_VIOLATED!>NL<String>()<!>
|
val test8 = NL<String>()
|
||||||
|
|
||||||
class NumberPhile<T: Number>(x: T)
|
class NumberPhile<T: Number>(x: T)
|
||||||
val np1 = NumberPhile(10)
|
val np1 = NumberPhile(10)
|
||||||
|
|||||||
+2
-2
@@ -58,9 +58,9 @@ FILE: upperBoundViolated.kt
|
|||||||
|
|
||||||
}
|
}
|
||||||
public final typealias NL<K> = R|NumColl<kotlin/collections/List<K>>|
|
public final typealias NL<K> = R|NumColl<kotlin/collections/List<K>>|
|
||||||
public final val test7: R|NumColl<kotlin/collections/List<kotlin/Int>>| = R|SubstitutionOverride</NumColl.NumColl>|<R|kotlin/Int|>()
|
public final val test7: R|NumColl<kotlin/collections/List<kotlin/Int>>| = R|/NumColl.NumColl|<R|kotlin/Int|>()
|
||||||
public get(): R|NumColl<kotlin/collections/List<kotlin/Int>>|
|
public get(): R|NumColl<kotlin/collections/List<kotlin/Int>>|
|
||||||
public final val test8: R|NumColl<kotlin/collections/List<kotlin/String>>| = R|SubstitutionOverride</NumColl.NumColl>|<R|kotlin/String|>()
|
public final val test8: R|NumColl<kotlin/collections/List<kotlin/String>>| = R|/NumColl.NumColl|<R|kotlin/String|>()
|
||||||
public get(): R|NumColl<kotlin/collections/List<kotlin/String>>|
|
public get(): R|NumColl<kotlin/collections/List<kotlin/String>>|
|
||||||
public final class NumberPhile<T : R|kotlin/Number|> : R|kotlin/Any| {
|
public final class NumberPhile<T : R|kotlin/Number|> : R|kotlin/Any| {
|
||||||
public constructor<T : R|kotlin/Number|>(x: R|T|): R|NumberPhile<T>| {
|
public constructor<T : R|kotlin/Number|>(x: R|T|): R|NumberPhile<T>| {
|
||||||
|
|||||||
+4
-4
@@ -5,8 +5,8 @@ typealias N<T> = Num<T>
|
|||||||
typealias N2<T> = N<T>
|
typealias N2<T> = N<T>
|
||||||
|
|
||||||
val x1 = <!INAPPLICABLE_CANDIDATE!>Num<!><String>("")
|
val x1 = <!INAPPLICABLE_CANDIDATE!>Num<!><String>("")
|
||||||
val x2 = <!UPPER_BOUND_VIOLATED!>N<String>("")<!>
|
val x2 = N<String>("")
|
||||||
val x3 = <!UPPER_BOUND_VIOLATED!>N2<String>("")<!>
|
val x3 = N2<String>("")
|
||||||
|
|
||||||
class TColl<T, C : Collection<T>>
|
class TColl<T, C : Collection<T>>
|
||||||
|
|
||||||
@@ -14,5 +14,5 @@ typealias TC<T, C> = TColl<T, C>
|
|||||||
typealias TC2<T, C> = TC<T, C>
|
typealias TC2<T, C> = TC<T, C>
|
||||||
|
|
||||||
val y1 = TColl<Any, <!UPPER_BOUND_VIOLATED!>Any<!>>()
|
val y1 = TColl<Any, <!UPPER_BOUND_VIOLATED!>Any<!>>()
|
||||||
val y2 = <!UPPER_BOUND_VIOLATED!>TC<Any, Any>()<!>
|
val y2 = TC<Any, Any>()
|
||||||
val y3 = <!UPPER_BOUND_VIOLATED!>TC2<Any, Any>()<!>
|
val y3 = TC2<Any, Any>()
|
||||||
|
|||||||
Vendored
+1
-1
@@ -14,4 +14,4 @@ fun test4(x: TC2<Number, List<Any>>) {}
|
|||||||
val test5 = TC2<Number, Collection<Number>>()
|
val test5 = TC2<Number, Collection<Number>>()
|
||||||
val test6 = TC2<Number, Collection<Int>>()
|
val test6 = TC2<Number, Collection<Int>>()
|
||||||
val test7 = TC2<Number, List<Int>>()
|
val test7 = TC2<Number, List<Int>>()
|
||||||
val test8 = <!UPPER_BOUND_VIOLATED!>TC2<Number, List<Any>>()<!>
|
val test8 = TC2<Number, List<Any>>()
|
||||||
|
|||||||
+3
-3
@@ -16,10 +16,10 @@ fun test3(x: NL<Int>) {}
|
|||||||
fun test4(x: NL<Any>) {}
|
fun test4(x: NL<Any>) {}
|
||||||
|
|
||||||
val test5 = NA<Int>()
|
val test5 = NA<Int>()
|
||||||
val test6 = <!UPPER_BOUND_VIOLATED!>NA<Any>()<!>
|
val test6 = NA<Any>()
|
||||||
val test7 = NL<Int>()
|
val test7 = NL<Int>()
|
||||||
val test8 = MMMM<Int>()
|
val test8 = MMMM<Int>()
|
||||||
val test9dwd = <!UPPER_BOUND_VIOLATED!>NL<Any>()<!>
|
val test9dwd = NL<Any>()
|
||||||
|
|
||||||
fun test9(x: TC<Number, Collection<Number>>) {}
|
fun test9(x: TC<Number, Collection<Number>>) {}
|
||||||
fun test10(x: TC<Number, Collection<Int>>) {}
|
fun test10(x: TC<Number, Collection<Int>>) {}
|
||||||
@@ -29,4 +29,4 @@ fun test12(x: TC<Number, List<Any>>) {}
|
|||||||
val test13 = TC<Number, Collection<Number>>()
|
val test13 = TC<Number, Collection<Number>>()
|
||||||
val test14 = TC<Number, Collection<Int>>()
|
val test14 = TC<Number, Collection<Int>>()
|
||||||
val test15 = TC<Number, List<Int>>()
|
val test15 = TC<Number, List<Int>>()
|
||||||
val test16 = <!UPPER_BOUND_VIOLATED!>TC<Number, List<Any>>()<!>
|
val test16 = TC<Number, List<Any>>()
|
||||||
|
|||||||
Vendored
+1
-1
@@ -5,7 +5,7 @@ class Num<Tn : Number>(val x: Tn)
|
|||||||
typealias N<T> = Num<T>
|
typealias N<T> = Num<T>
|
||||||
|
|
||||||
val test0 = N(1)
|
val test0 = N(1)
|
||||||
val test1 = <!UPPER_BOUND_VIOLATED!>N("1")<!>
|
val test1 = N("1")
|
||||||
|
|
||||||
|
|
||||||
class Cons<T>(val head: T, val tail: Cons<T>?)
|
class Cons<T>(val head: T, val tail: Cons<T>?)
|
||||||
|
|||||||
+1
-1
@@ -5,4 +5,4 @@ class Cons<T : Number>(val head: T, val tail: Cons<T>?)
|
|||||||
typealias C<T> = Cons<T>
|
typealias C<T> = Cons<T>
|
||||||
|
|
||||||
val test1 = C(1, C(2, null))
|
val test1 = C(1, C(2, null))
|
||||||
val test2 = <!UPPER_BOUND_VIOLATED!>C(1, <!UPPER_BOUND_VIOLATED!>C("", null)<!>)<!>
|
val test2 = C(1, C("", null))
|
||||||
|
|||||||
Vendored
+3
-3
@@ -29,9 +29,9 @@ val test3pr = <!INAPPLICABLE_CANDIDATE!>P2<!><String, Int, Int>(1, "")
|
|||||||
class Num<T : Number>(val x: T)
|
class Num<T : Number>(val x: T)
|
||||||
typealias N<T> = Num<T>
|
typealias N<T> = Num<T>
|
||||||
|
|
||||||
val testN0 = <!UPPER_BOUND_VIOLATED!>N("")<!>
|
val testN0 = N("")
|
||||||
val testN1 = N<Int>(1)
|
val testN1 = N<Int>(1)
|
||||||
val testN1a = <!UPPER_BOUND_VIOLATED!>N<String>("")<!>
|
val testN1a = N<String>("")
|
||||||
val testN2 = <!INAPPLICABLE_CANDIDATE!>N<!><Int, Int>(1)
|
val testN2 = <!INAPPLICABLE_CANDIDATE!>N<!><Int, Int>(1)
|
||||||
|
|
||||||
class MyPair<T1 : CharSequence, T2 : Number>(val string: T1, val number: T2)
|
class MyPair<T1 : CharSequence, T2 : Number>(val string: T1, val number: T2)
|
||||||
@@ -39,4 +39,4 @@ typealias MP<T1> = MyPair<String, T1>
|
|||||||
|
|
||||||
val testMP0 = MP<Int>("", 1)
|
val testMP0 = MP<Int>("", 1)
|
||||||
val testMP1 = <!INAPPLICABLE_CANDIDATE!>MP<!>(1, "")
|
val testMP1 = <!INAPPLICABLE_CANDIDATE!>MP<!>(1, "")
|
||||||
val testMP2 = <!UPPER_BOUND_VIOLATED!>MP<String>("", "")<!>
|
val testMP2 = MP<String>("", "")
|
||||||
|
|||||||
Reference in New Issue
Block a user