[Tests] Test samples from KEEP
This commit is contained in:
committed by
TeamCityServer
parent
b0a7be72e8
commit
d8faa9686d
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
typealias IterableClass<C, T> = (C) -> Iterator<T>
|
||||
|
||||
context(IterableClass<C, T>)
|
||||
fun <C, T> C.iterator(any: Any?): Iterator<T> = this<!UNRESOLVED_LABEL!>@IterableClass<!>.invoke(this)
|
||||
|
||||
fun <T> listOf(vararg items: T): List<T> = null!!
|
||||
|
||||
fun test() {
|
||||
val f: IterableClass<List<Int>, Int> = {
|
||||
it.listIterator()
|
||||
}
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>with<!>(f) {
|
||||
listOf(1, 2, 3).iterator(null)
|
||||
}
|
||||
listOf(1, 2, 3).<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>iterator<!>(null)
|
||||
}
|
||||
Reference in New Issue
Block a user