Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/regressions/kt2459.kt
T
Svetlana Isakova 4b77e9b83a tests for obsolete tasks
#KT-2445 fixed
 #KT-2459 fixed
2012-08-06 18:18:27 +04:00

10 lines
274 B
Kotlin

//KT-2459 Type inference error
package b
import java.util.*
class B<T>(val x: List<T>)
fun <T> f(x: T): B<T> = B(arrayList(x))
// from standard library
fun arrayList<T>(vararg <!UNUSED_PARAMETER!>values<!>: T) : ArrayList<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>