[FIR] Implement REIFIED_TYPE_FORBIDDEN_SUBSTITUTION
This commit is contained in:
committed by
teamcityserver
parent
bade6cb611
commit
173813f7cf
+2
-2
@@ -11,5 +11,5 @@ fun test1() {
|
||||
val f2: Foo<in Nothing> = foo1 { it checkType { _<Nothing>() } }
|
||||
|
||||
val f3: Foo<out Int> = foo2 { it checkType { _<Int>() } }
|
||||
val f4: Foo<in Nothing> = foo2 { it checkType { _<Nothing>() } }
|
||||
}
|
||||
val f4: Foo<in Nothing> = <!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>foo2<!> { it checkType { _<Nothing>() } }
|
||||
}
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ fun test2() {
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
takeReifiedUnbound(null)
|
||||
<!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>takeReifiedUnbound<!>(null)
|
||||
}
|
||||
|
||||
fun test4(): Bound = takeReifiedUnbound(null)
|
||||
@@ -35,7 +35,7 @@ fun test5(): Bound? = select(
|
||||
fun test6() {
|
||||
select(
|
||||
null,
|
||||
materializeReified()
|
||||
<!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>materializeReified<!>()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -48,6 +48,6 @@ fun test7(): Bound? =
|
||||
fun test8() {
|
||||
select(
|
||||
null,
|
||||
materializeReifiedUnbound()
|
||||
<!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>materializeReifiedUnbound<!>()
|
||||
)
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -28,7 +28,7 @@ inline fun <reified T : In<T>> testIn(): T {
|
||||
// Unexpected behaviour
|
||||
inline fun <reified T : Out<T>> testOut(): T {
|
||||
return try {
|
||||
outBound()
|
||||
<!REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>outBound<!>()
|
||||
} catch (ex: Exception) {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user