Revert "Update test data as operator 'mod' became deprecated"

This reverts commit 040f4e90ce.
This commit is contained in:
Mikhail Zarechenskiy
2016-12-12 17:28:28 +03:00
parent 42d867b3bf
commit e67543e08e
7 changed files with 21 additions and 21 deletions
@@ -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)