Revert "Update test data as operator 'mod' became deprecated"
This reverts commit 040f4e90ce.
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
package i
|
||||
|
||||
public fun<T> from(<!UNUSED_PARAMETER!>yielder<!>: ()->Iterable<T>) : Iterable<T> {
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
public infix fun<T> Iterable<T>.where(<!UNUSED_PARAMETER!>predicate<!> : (T)->Boolean) : ()->Iterable<T> {
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
fun a() {
|
||||
val x = 0..200
|
||||
val odd = from (x where {it<!DEPRECATED_BINARY_MOD_AS_REM!>%<!>2==0}) // I believe it should infer here
|
||||
val odd = from (x where {it%2==0}) // I believe it should infer here
|
||||
|
||||
checkSubtype<Iterable<Int>>(odd)
|
||||
}
|
||||
|
||||
@@ -6,15 +6,15 @@ package i
|
||||
import java.util.ArrayList
|
||||
|
||||
public infix fun<TItem> Iterable<TItem>.where(<!UNUSED_PARAMETER!>predicate<!> : (TItem)->Boolean) : ()->Iterable<TItem> {
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
public fun<TItem, TResult> select(<!UNUSED_PARAMETER!>yielder<!>: ()->Iterable<TItem>, <!UNUSED_PARAMETER!>selector<!> : (TItem)->TResult) : ()->Iterable<TResult> {
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
|
||||
|
||||
fun a() {
|
||||
val x = 0..200
|
||||
val z = x where { i: Int -> i <!DEPRECATED_BINARY_MOD_AS_REM!>%<!> 2 == 0 }
|
||||
val yielder = select(x where { it<!DEPRECATED_BINARY_MOD_AS_REM!>%<!>2==0 }, { it.toString() })
|
||||
val z = x where { i: Int -> i % 2 == 0 }
|
||||
val yielder = select(x where { it%2==0 }, { it.toString() })
|
||||
|
||||
checkSubtype<() -> Iterable<Int>>(z)
|
||||
checkSubtype<() -> Iterable<String>>(yielder)
|
||||
|
||||
Reference in New Issue
Block a user