Added tests for simple approximation (of Captured(out/in Int))

This commit is contained in:
Svetlana Isakova
2014-12-17 16:31:06 +03:00
parent 9d09a4d1b4
commit 74a08c9747
5 changed files with 36 additions and 0 deletions
@@ -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?> }
}
@@ -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
@@ -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> }
}
@@ -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