Added tests for obsolete tasks
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
import java.io.File
|
||||
|
||||
fun test() {
|
||||
val dir = File("dir")
|
||||
val files = dir.listFiles()?.toList() ?: listOf() // error
|
||||
files checkType { _<List<File>>() }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
internal fun test(): kotlin.Unit
|
||||
@@ -0,0 +1,10 @@
|
||||
// !CHECK_TYPE
|
||||
|
||||
fun <T> bar(f: () -> T) : T = f()
|
||||
|
||||
fun test(map: MutableMap<Int, Int>) {
|
||||
val r = bar {
|
||||
map[1] = 2
|
||||
}
|
||||
r checkType { _<Unit>() }
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
internal fun </*0*/ T> bar(/*0*/ f: () -> T): T
|
||||
internal fun test(/*0*/ map: kotlin.MutableMap<kotlin.Int, kotlin.Int>): kotlin.Unit
|
||||
Reference in New Issue
Block a user