[Tests] Trim contents before checking for FIR_IDENTICAL
This commit is contained in:
committed by
Space Team
parent
6b919e2593
commit
10e94f90ac
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
|
||||
fun <T> Array<out T>.intersect(other: Iterable<T>) {
|
||||
val set = toMutableSet()
|
||||
set.retainAll(other)
|
||||
}
|
||||
|
||||
fun <X> Array<out X>.toMutableSet(): MutableSet<X> = TODO()
|
||||
fun <Y> MutableCollection<in Y>.retainAll(elements: Iterable<Y>) {}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
fun <T> Array<out T>.intersect(other: Iterable<T>) {
|
||||
val set = toMutableSet()
|
||||
set.retainAll(other)
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
// completion order here: X, Y, WHEN_VARIABLE
|
||||
fun <T> List<T>.optimizeReadOnlyList() = when (size) {
|
||||
0 -> emptyList() // here type variable Y will be fixed to Nothing
|
||||
1 -> listOf(this[0])
|
||||
else -> this
|
||||
}
|
||||
fun <X> listOf(element: X): List<X> = TODO()
|
||||
fun <Y> emptyList(): List<Y> = TODO()
|
||||
|
||||
|
||||
fun test(l: List<String>): List<String> {
|
||||
val foo = l.optimizeReadOnlyList()
|
||||
return foo
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// completion order here: X, Y, WHEN_VARIABLE
|
||||
fun <T> List<T>.optimizeReadOnlyList() = when (size) {
|
||||
0 -> emptyList() // here type variable Y will be fixed to Nothing
|
||||
|
||||
Reference in New Issue
Block a user