Added tests for simple approximation (of Captured(out/in Int))
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
|
||||
fun <T> foo(a: Array<T>): T = null!!
|
||||
|
||||
fun test(a: Array<in Int>) {
|
||||
foo(a) checkType { it : _<Any?> }
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
internal fun </*0*/ T> foo(/*0*/ a: kotlin.Array<T>): T
|
||||
internal fun test(/*0*/ a: kotlin.Array<in kotlin.Int>): kotlin.Unit
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !CHECK_TYPE
|
||||
|
||||
fun <T> foo(a: Array<T>): T = null!!
|
||||
|
||||
fun test(a: Array<out Int>) {
|
||||
foo(a) checkType { it : _<Int> }
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
internal fun </*0*/ T> foo(/*0*/ a: kotlin.Array<T>): T
|
||||
internal fun test(/*0*/ a: kotlin.Array<out kotlin.Int>): kotlin.Unit
|
||||
Reference in New Issue
Block a user